mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
Add connection between spring boot server and postgresql database
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
parent
7d4d65c780
commit
ddcbf6f7bd
9 changed files with 107 additions and 1 deletions
|
@ -4,6 +4,10 @@ services:
|
|||
build: backend
|
||||
ports:
|
||||
- 80:8080
|
||||
environment:
|
||||
POSTGRES_DB: example
|
||||
networks:
|
||||
- spring-postges
|
||||
db:
|
||||
environment:
|
||||
POSTGRES_DB: example
|
||||
|
@ -14,8 +18,12 @@ services:
|
|||
- db-password
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- spring-postges
|
||||
volumes:
|
||||
db-data: {}
|
||||
secrets:
|
||||
db-password:
|
||||
file: db/password.txt
|
||||
networks:
|
||||
spring-postges: {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue