awesome-compose/nginx-golang-postgres/.docker/docker-compose.yaml
Guillaume Lours d189dc884d
add configuration to use nginx-golang-postgres sample with Docker Dev Environments feature
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-05 14:51:18 +02:00

36 lines
619 B
YAML

services:
backend:
build:
context: backend
target: dev-envs
secrets:
- db-password
depends_on:
- db
volumes:
- /var/run/docker.sock:/var/run/docker.sock
db:
image: postgres
restart: always
secrets:
- db-password
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=example
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
expose:
- 5432
proxy:
build: proxy
ports:
- 80:80
depends_on:
- backend
volumes:
db-data:
secrets:
db-password:
file: db/password.txt