Power Awarness Tool
- Docker and Docker Compose should be installed on your machine.
-
Clone the repository:
git clone https://github.com/akvo/partos-pat.git cd partos-pat
-
Environment Setup:
- Copy
.env.example
to.env
and change the values to suit your local environment:cp .env.example .env
- Set the desired values for the following variables:
MAILJET_APIKEY=YOUR_MAILJET_API_KEY MAILJET_SECRET=YOUR_MAILJET_SECRET WEBDOMAIN="<<full site URL (default: http://localhost:3000)>>"
- Copy
-
Build and Start the Containers:
Run the following command to build and start all services:
docker compose up -d
This will spin up the following services:
- Backend
- Frontend
- PostgreSQL Database
- PgAdmin
-
Stopping the Containers:
To stop the containers without removing them, run:
docker compose stop
To stop and remove the containers, networks, and volumes, run:
docker compose down
The backend service runs on port 8000 and handles the core application logic. Access it at http://localhost:8000.
The frontend service runs on port 3000 and provides the user interface. Access it at http://localhost:3000.
API documentation (Swagger) is hosted at http://localhost:3000/api/docs.
PgAdmin for managing your PostgreSQL database is accessible on port 5050. Access it at http://localhost:5050.
Use the following credentials to log in to PgAdmin:
- Email:
dev@akvo.org
- Password:
password
-
If a service fails to start, check the logs with:
docker compose logs <service-name>
-
Common issues may include port conflicts or missing environment variables. Ensure all ports are available and all required
.env
files are present.