services:
  db:
    image: postgres
    restart: always
    ports:
      - 5050:5432
    volumes:
      - ./data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: ${DB_USER:-admin}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DB:-drp}

  adminer:
    image: adminer
    restart: always
    depends_on: 
      - db
    ports:
      - 8100:8080

  server:
    restart: unless-stopped
    build:
      context: ./backend
      dockerfile: Dockerfile
    ports:
      - 4044:8080


  web:
    restart: unless-stopped
    build:
      context: ./frontend
      dockerfile: Dockerfile
    ports:
      - 6060:80
