services:
  php-apache:
    build: ./docker/php-apache
    container_name: php-apache
    ports:
      - '8080:80'
    volumes:
      - .:/var/www/html
    depends_on:
      - postgres
      - redis

  postgres:
    image: ghcr.io/fboulnois/pg_uuidv7:1.6.0
    container_name: postgres
    environment:
      POSTGRES_USER: taf
      POSTGRES_PASSWORD: TAF123*
      POSTGRES_DB: tafdb
    ports:
      - '5432:5432'
    volumes:
      - pgdata:/var/lib/postgresql/data

  redis:
    image: redis:7
    container_name: redis
    ports:
      - '6379:6379'

volumes:
  pgdata:
#   websocket-server:
#     build: ./websocket-server
#     container_name: websocket-server
#     working_dir: /usr/src/app
#     volumes:
#       - ./websocket-server:/usr/src/app
#     ports:
#       - "8081:8081"
#     environment:
#       - PORT=8081
#     depends_on:
#       - redis
#       - postgres

# optional Installation server (commented out for now)
# installation-server:
#   build: ./docker/installation-server
#   container_name: installation-server
#   working_dir: /usr/src/app
#   volumes:
#     - ./Installation:/usr/src/app
#   ports:
#     - "3002:3002"
#   environment:
#     - PORT=3002
#   depends_on:
#     - redis
#     - postgres
