version: "3.8" services: ihatemoney: build: context: . dockerfile: Dockerfile restart: unless-stopped ports: - 18000:8000 environment: SQLALCHEMY_DATABASE_URI: "postgresql://ihatemoney:ihatemoney@db/ihatemoney?client_encoding=utf8" db: image: postgres:13 restart: unless-stopped environment: POSTGRES_USER: "ihatemoney" POSTGRES_PASSWORD: "ihatemoney" POSTGRES_DB: "ihatemoney" PGDATA: "/var/lib/postgresql/data/pgdata" volumes: - ./db:/var/lib/postgresql/data/pgdata