version: "3"

services:
  core:
    container_name: rating-orama
    image: rating-orama:latest
    environment:
      DRIVERNAME: pgx
      DATASOURCE: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
      MIGRATE: true
    ports:
      - "8086:8080"
    networks:
      - ratingorama
  db:
    container_name: db-ratingorama
    image: postgres:16.4-alpine3.20
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      - ratingorama_data:/var/lib/postgresql/data
    networks:
      - ratingorama

networks:
  ratingorama:

volumes:
  ratingorama_data:
