vdkch/docker-compose.yml

33 lines
594 B
YAML
Raw Normal View History

2024-08-14 21:08:10 +10:00
version: '3.8'
services:
postgres:
image: postgres:latest
container_name: postgres
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: mydatabase
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- mynetwork
app:
build: .
container_name: app
environment:
DATABASE_URL: "postgresql://user:password@postgres:5432/mydatabase"
depends_on:
- postgres
networks:
- mynetwork
networks:
mynetwork:
driver: bridge
volumes:
postgres_data: