version: '3.8'
services:
  db:
    image: postgres:14.1-alpine
    container_name: db_container_sak
    restart: always
    environment:
      - POSTGRES_DB=$DB_NAME
      - POSTGRES_USER=$DB_USER
      - POSTGRES_PASSWORD=$DB_PASS
    ports:
      - '31000:5432'
    volumes:
      - db:/var/lib/postgresql/data
    networks:
      - sak_network

  etl:
    build:
      dockerfile: Dockerfile
    container_name: 'etl_sak'
    image: 'sak_etl'
    depends_on:
      - db
    stdin_open: true
    tty: true
    networks:
      - sak_network
    volumes:
      - ./etl:/usr/src/etl
volumes:
  db:
    driver: local
networks:
  sak_network:
    name: 'sak_app_network'