version: '3.8' services: db: image: postgres:15 container_name: afrohub_db restart: always environment: POSTGRES_USER: admin POSTGRES_PASSWORD: adminpassword POSTGRES_DB: afrohub_dev ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U admin -d afrohub_dev"] interval: 10s timeout: 5s retries: 5 app: image: git.home.arrondeau.fr/streaper2/afrov2:latest build: context: . dockerfile: Dockerfile container_name: afrohub_app restart: always ports: - "3000:3000" environment: - DATABASE_URL=postgresql://admin:adminpassword@db:5432/afropreunariat_dev?schema=public - NEXT_PUBLIC_SITE_URL=http://localhost:3000 depends_on: db: condition: service_healthy admin: image: git.home.arrondeau.fr/streaper2/afrov2-admin:latest build: context: ./admin dockerfile: Dockerfile container_name: afrohub_admin restart: always ports: - "3001:3001" environment: - DATABASE_URL=postgresql://admin:adminpassword@db:5432/afropreunariat_dev?schema=public - NEXT_PUBLIC_SITE_URL=http://localhost:3000 - NEXT_PUBLIC_ADMIN_URL=http://localhost:3001 depends_on: db: condition: service_healthy volumes: pgdata: