mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
add spring-postgres application sample
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
This commit is contained in:
parent
2919af7ea3
commit
cc8e56e4b7
8 changed files with 147 additions and 0 deletions
21
samples/spring-postgres/docker-compose.yaml
Normal file
21
samples/spring-postgres/docker-compose.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
backend:
|
||||
build: backend
|
||||
ports:
|
||||
- 80:8080
|
||||
db:
|
||||
environment:
|
||||
POSTGRES_DB: example
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/db-password
|
||||
image: postgres
|
||||
restart: always
|
||||
secrets:
|
||||
- db-password
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
volumes:
|
||||
db-data: {}
|
||||
secrets:
|
||||
db-password:
|
||||
file: db/password.txt
|
Loading…
Add table
Add a link
Reference in a new issue