Skip to content

Commit 4afa012

Browse files
authored
docker-compose.yml
1 parent 358f63e commit 4afa012

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docker-compose.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
version: "2.0"
3+
services:
4+
web:
5+
build:
6+
context: .
7+
dockerfile: multistage.Dockerfile
8+
ports:
9+
- 8443:8443
10+
environment:
11+
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/youdemy
12+
- SPRING_DATASOURCE_USERNAME=postgres
13+
- SPRING_DATASOURCE_PASSWORD=password
14+
- SPRING_JPA_HIBERNATE_DLL_AUTO=update
15+
- SPRING_JPA_SHOW_SQL=true
16+
restart: on-failure
17+
depends_on:
18+
- db
19+
db:
20+
image: postgres:14.2
21+
container_name: db
22+
restart: always
23+
environment:
24+
- POSTGRES_USER=postgres
25+
- POSTGRES_PASSWORD=password
26+
- POSTGRES_DB=youdemy
27+
volumes:
28+
- ./postgres:/var/lib/postgres

0 commit comments

Comments
 (0)