services:
  proxy:
    image: nginx:latest
    ports:
      - "80:80"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
  api:
    build: .
    environment:
      DATABASE_URL: postgres://admin:password@db:5432/app
      REDIS_URL: redis://cache:6379
    ports:
      - "5000:5000"
    depends_on:
      - db
      - cache
  db:
    image: postgres:latest
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: password
      POSTGRES_DB: app
    ports:
      - "5432:5432"
  cache:
    image: redis:latest
    ports:
      - "6379:6379"

