106 lines
2.0 KiB
Markdown
106 lines
2.0 KiB
Markdown
# Project Ploughshares
|
|
|
|
Transaction Management System for Project Ploughshares.
|
|
|
|
## Version
|
|
|
|
The current version is stored in the `VERSION` file. Use the `versionbump.sh` script to update the version number.
|
|
|
|
```bash
|
|
# To bump the patch version (e.g., 1.0.0 -> 1.0.1)
|
|
./versionbump.sh patch
|
|
|
|
# To bump the minor version (e.g., 1.0.0 -> 1.1.0)
|
|
./versionbump.sh minor
|
|
|
|
# To bump the major version (e.g., 1.0.0 -> 2.0.0)
|
|
./versionbump.sh major
|
|
```
|
|
|
|
## Docker Setup
|
|
|
|
The application is containerized using Docker and can be run using docker-compose.
|
|
|
|
```bash
|
|
# Build the containers
|
|
docker-compose build
|
|
|
|
# Start the application
|
|
docker-compose up
|
|
```
|
|
|
|
The application will be available at http://localhost:5001.
|
|
|
|
## Features
|
|
|
|
- Transaction management (create, view, edit)
|
|
- Document uploads and attachments
|
|
- API endpoints for programmatic access
|
|
- PostgreSQL database for data storage
|
|
|
|
## Running the Application
|
|
|
|
### Using Docker (Recommended)
|
|
|
|
The application can be run using Docker:
|
|
|
|
```bash
|
|
# Run with PostgreSQL database
|
|
docker-compose up --build
|
|
```
|
|
|
|
This will:
|
|
1. Build the Docker image
|
|
2. Start PostgreSQL database
|
|
3. Initialize the database schema
|
|
4. Start the application on port 5001
|
|
|
|
#### Stopping the Application
|
|
|
|
```bash
|
|
# Stop all containers
|
|
docker-compose down
|
|
```
|
|
|
|
### Running Locally
|
|
|
|
1. Start PostgreSQL:
|
|
```bash
|
|
./start_postgres.sh
|
|
```
|
|
|
|
2. Initialize the database:
|
|
```bash
|
|
python init_db.py
|
|
```
|
|
|
|
3. Start the application:
|
|
```bash
|
|
python app.py
|
|
```
|
|
|
|
## API Documentation
|
|
|
|
API documentation is available at:
|
|
- http://localhost:5001/api-docs
|
|
- http://localhost:5001/api/docs
|
|
- http://localhost:5001/docs
|
|
|
|
## Testing
|
|
|
|
To generate test data:
|
|
|
|
```bash
|
|
python generate_test_data.py
|
|
```
|
|
|
|
## Accessing the Application
|
|
|
|
The application runs on all addresses (0.0.0.0) and is accessible via:
|
|
- http://localhost:5001 (Docker)
|
|
- http://localhost:5001 (Local)
|
|
- http://<machine-ip>:5001 (Network access)
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License - see the LICENSE file for details. |