services:
  frontend:
    build:
      context: ./
      dockerfile: ./docker/app.Dockerfile
    environment:
      - PORT=${WEB_PORT}
    ports:
      - ${WEB_PORT}:${WEB_PORT}
    volumes:
      - ./src:/app/src
      - ./static:/app/static
      - ./vite.config.js:/app/vite.config.js
      - ./tsconfig.json:/app/tsconfig.json
      - ./svelte.config.js:/app/svelte.config.js
  db:
    build: 
      context: ./
      dockerfile: ./docker/postgres.Dockerfile
    environment:
      - POSTGRES_PASSWORD=${PG_PASS}
      - POSTGRES_USER=${PG_USER}
      - POSTGRES_DB=${PG_DB}
    ports:
      - ${PG_PORT}:5432
    volumes:
      - ./postgres:/var/lib/postgresql/data 