32 lines
563 B
YAML
32 lines
563 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: pg-demo
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: demo
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
backend:
|
|
build: .
|
|
container_name: backend-demo
|
|
restart: always
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:postgres@postgres:5432/demo
|
|
PORT: 3000
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
pgdata:
|
|
|