version: "3.1"

volumes:
  db:

services:
  db:
    image: postgres
    # Uncomment to log all queries
    command: ["postgres", "-c", "log_statement=all"]
    restart: always
    environment:
      # postgresql://user:pass@localhost:5432/webstudio
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: webstudio
      POSTGRES_USER: user
    volumes:
      - db:/var/lib/postgresql/data
    ports:
      - ${PGPORT:-5432}:5432
