version: '3.8'

services:
  web:
    image: nginx:latest
    ports:
      - "80:80"
      - "443:443"
    environment:
      - DB_HOST=docker-db.internal
      - DB_USER=docker_user
      - DB_PASSWORD=DockerComposePassword2024!Secret
      - DB_NAME=docker_production
      - API_KEY=docker-compose-api-key-abc123def456
      - JWT_SECRET=docker-compose-jwt-secret-xyz789
      - AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
      - AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    volumes:
      - ./data:/var/www/html

  database:
    image: postgres:15
    environment:
      - POSTGRES_USER=docker_db_user
      - POSTGRES_PASSWORD=DockerComposeDbPass2024!Secret
      - POSTGRES_DB=docker_production_db
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    image: redis:7
    command: redis-server --requirepass DockerComposeRedisPass2024!Secret
    environment:
      - REDIS_PASSWORD=DockerComposeRedisPass2024!Secret

volumes:
  db_data:

