1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-19 07:18:06 +02:00

nginx-golang-postgres: add dev envs config (#275)

* 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>
This commit is contained in:
Milas Bowman 2022-07-12 04:08:02 -04:00 committed by GitHub
parent 9d547d23fb
commit 7f5179ea3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 156 additions and 32 deletions

View file

@ -1,13 +1,18 @@
services:
backend:
build: backend
build:
context: backend
target: builder
secrets:
- db-password
depends_on:
- db
db:
condition: service_healthy
db:
image: postgres
restart: always
user: postgres
secrets:
- db-password
volumes:
@ -17,15 +22,27 @@ services:
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
expose:
- 5432
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
proxy:
build: 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