version: "3.7"
services:
  db:
    # image: postgres
    build:
      context: .
      dockerfile: db.Dockerfile
    restart: always
    ports:
      - 4321:5432
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
  server:
    build:
      context: .
      dockerfile: server.Dockerfile
    restart: always
    ports:
      - 3000:3000

volumes: 
  pgdata: