Skip to content

akvo/partos-pat

Repository files navigation

partos-pat

Power Awarness Tool

Coverage Status DBdocs

Table of Contents

Prerequisites

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/akvo/partos-pat.git
    cd partos-pat
  2. 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)>>"
    
  3. 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
  4. 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

Services

Backend

The backend service runs on port 8000 and handles the core application logic. Access it at http://localhost:8000.

Frontend

The frontend service runs on port 3000 and provides the user interface. Access it at http://localhost:3000.

API Documentation

API documentation (Swagger) is hosted at http://localhost:3000/api/docs.

PgAdmin

PgAdmin for managing your PostgreSQL database is accessible on port 5050. Access it at http://localhost:5050.

PgAdmin Credentials

Use the following credentials to log in to PgAdmin:

  • Email: dev@akvo.org
  • Password: password

Troubleshooting

  • 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.