You can launch easily the project using docker
Before launching the project, you need to configure your environment variables:
-
Copy the example environment file:
cp .env.example .env
-
Edit the
.envfile with your configuration:nano .env
-
Update the following values:
DATABASE_NAME: Your PostgreSQL database nameDATABASE_USERNAME: Your PostgreSQL usernameDATABASE_PASSWORD: Your PostgreSQL passwordDATABASE_URL: Update with your actual database credentialsAPI_JEB_TOKEN: Update with your actual JEB api tokenAPI_JEB_URL: Update with your actual JEB api urlJWT_SECRET: Update with your actual jwt token secretPGADMIN_DEFAULT_EMAIL: Your PgAdmin login email (dev only)PGADMIN_DEFAULT_PASSWORD: Your PgAdmin password (dev only)
Start all services in development mode:
docker-compose -f docker-compose-dev.yml up --buildStart services in background (detached mode):
docker-compose -f docker-compose-dev.yml up --build -dStart all services in production mode:
docker-compose up --buildStart services in background (detached mode):
docker-compose up --build -dOnce the containers are running, you can access the following services:
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3000 | Main application interface |
| Backend API | http://localhost:3001 | REST API endpoints |
| Database | localhost:5432 |
PostgreSQL database |
| PgAdmin | http://localhost:5050 | Database administration (dev only) |
View logs for all services:
# Development
docker-compose -f docker-compose-dev.yml logs
# Production
docker-compose logsView logs for a specific service:
# Development
docker-compose -f docker-compose-dev.yml logs <service_name>
# Production
docker-compose logs <service_name>Follow logs in real-time:
# Development
docker-compose -f docker-compose-dev.yml logs -f
# Production
docker-compose logs -fAccess a container shell:
# Development
docker-compose -f docker-compose-dev.yml exec <service_name> /bin/bash
# Production
docker-compose exec <service_name> /bin/bashRun a specific command:
# Development
docker-compose -f docker-compose-dev.yml exec <service_name> <command>
# Production
docker-compose exec <service_name> <command>View running containers:
# Development
docker-compose -f docker-compose-dev.yml ps
# Production
docker-compose psStop all services:
# Development
docker-compose -f docker-compose-dev.yml down
# Production
docker-compose downStop and remove volumes (
# Development
docker-compose -f docker-compose-dev.yml down -v
# Production
docker-compose down -vRestart all services:
# Development
docker-compose -f docker-compose-dev.yml restart
# Production
docker-compose restartRestart a specific service:
# Development
docker-compose -f docker-compose-dev.yml restart <service_name>
# Production
docker-compose restart <service_name>Force rebuild of all containers:
# Development
docker-compose -f docker-compose-dev.yml up --build --force-recreate
# Production
docker-compose up --build --force-recreateRemove unused Docker resources:
docker system prune -aRemove all stopped containers:
docker container pruneRemove unused volumes:
docker volume prune- Port already in use: Make sure no other services are running on ports 3000, 3001, 5432, or 5050
- Permission denied: Ensure Docker has proper permissions on your system
- Database connection failed: Check your
.envfile configuration - Container won't start: Check logs with
docker-compose logs <service_name>
If you encounter persistent issues, you can reset the entire setup:
# Development
docker-compose -f docker-compose-dev.yml down -v
docker system prune -a
docker-compose -f docker-compose-dev.yml up --build
# Production
docker-compose down -v
docker system prune -a
docker-compose up --buildNote: The development environment includes PgAdmin for database management, while the production environment is optimized for performance and security.