version: "3"

networks:
  app-tier:
    driver: bridge

services:
  postgresql:
    container_name: shellvalier-postgresql
    image: postgres:14.2
    environment:
      POSTGRES_USER: "shellvalier"
      POSTGRES_DB: "shellvalier"
      POSTGRES_PASSWORD: "shellvalier"
      POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8"
    networks:
      - app-tier
    volumes:
      - ./.datastore/postgresql:/var/lib/postgresql/data

  backend:
    container_name: shellvalier-backend
    image: shellvalier-developer:latest
    depends_on:
      - postgresql
    networks:
      - app-tier
    env_file: .environment-dev
    volumes:
      - .:/app
    ports:
      - "8000:8000"
