version: '3.8' services: # ------------------------------------------------------------------------- # Service Base de données # ------------------------------------------------------------------------- database: image: postgres:15-alpine container_name: tax_database environment: POSTGRES_DB: app POSTGRES_PASSWORD: root POSTGRES_USER: app volumes: - db-data:/var/lib/postgresql/data ports: - "5433:5432" # ------------------------------------------------------------------------- # Service Backend API (Symfony) # ------------------------------------------------------------------------- php: build: context: ./api target: app_php_dev container_name: tax_api depends_on: - database restart: unless-stopped volumes: - ./api:/app - ./resources:/app/resources environment: DATABASE_URL: postgresql://app:root@database:5432/app?serverVersion=15&charset=utf8 CORS_ALLOW_ORIGIN: ^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$ APP_SECRET: root XDEBUG_MODE: off command: php -S 0.0.0.0:80 -t public ports: - "8000:80" # ------------------------------------------------------------------------- # Service Frontend (PWA) # ------------------------------------------------------------------------- frontend: build: context: ./impots-react-app target: dev container_name: tax_frontend volumes: - ./impots-react-app:/app - /app/node_modules ports: - "3000:3000" command: npm start environment: NEXT_PUBLIC_ENTRYPOINT: http://localhost:8000/api REACT_APP_API_URL: http://localhost:8000/api volumes: db-data: