version: "2"

services:
  db:
    image: postgres:alpine
    volumes:
      - "./sql_init.sh:/docker-entrypoint-initdb.d/init_user_db.sh:ro"
      - "pg_data:/var/lib/postgresql/data"
    environment:
      - POSTGRES_PASSWORD=postgres

  web:
    build: .
    ports:
      - "5000:5000"
    depends_on:
      - db

volumes:
  pg_data:
