compose.yaml 1,69 ko
Newer Older
Matthias BIZET's avatar
Matthias BIZET a validé
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)
  # -------------------------------------------------------------------------
Matthias BIZET's avatar
Matthias BIZET a validé
  php:
    build:
      context: ./api
      target: app_php_dev
    container_name: tax_api
Matthias BIZET's avatar
Matthias BIZET a validé
    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
Matthias BIZET's avatar
Matthias BIZET a validé
    ports:
Matthias BIZET's avatar
Matthias BIZET a validé

  # -------------------------------------------------------------------------
  # Service Frontend (PWA)
  # -------------------------------------------------------------------------
      context: ./impots-react-app
    container_name: tax_frontend
Matthias BIZET's avatar
Matthias BIZET a validé
    volumes:
      - ./impots-react-app:/app
      - /app/node_modules
    ports:
      - "3000:3000"
    environment:
      NEXT_PUBLIC_ENTRYPOINT: http://localhost:8000/api
      REACT_APP_API_URL: http://localhost:8000/api
Matthias BIZET's avatar
Matthias BIZET a validé
volumes: