7f5179ea3e
* Add Docker Desktop Development Environments config * Upgrade to Go 1.18 * Replace nginx build with image + read-only bind mount Signed-off-by: Milas Bowman <milas.bowman@docker.com>
51 lines
917 B
YAML
51 lines
917 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: backend
|
|
target: dev-envs
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
secrets:
|
|
- db-password
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: postgres
|
|
restart: always
|
|
user: postgres
|
|
secrets:
|
|
- db-password
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_DB=example
|
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
|
expose:
|
|
- 5432
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
proxy:
|
|
image: nginx
|
|
volumes:
|
|
- type: bind
|
|
source: ./proxy/nginx.conf
|
|
target: /etc/nginx/conf.d/default.conf
|
|
read_only: true
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
db-data:
|
|
|
|
secrets:
|
|
db-password:
|
|
file: db/password.txt
|