-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
37 lines (34 loc) · 977 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: "3.8"
services:
restaurant-db:
image: postgres:13.11-bullseye
restart: unless-stopped
env_file:
- ./.env
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_ROOT_PASSWORD
ports:
- "5433:5432"
volumes:
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
restaurant-app:
depends_on:
- restaurant-db
build: .
restart: on-failure
env_file: ./.env
ports:
- "9001:9000"
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active" : "prod",
"spring.datasource.url" : "jdbc:postgresql://restaurant-db:5432/$POSTGRES_DATABASE",
"spring.datasource.username" : "$POSTGRES_USER",
"spring.datasource.password" : "$POSTGRES_ROOT_PASSWORD",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.PostgreSQLDialect"
}'
volumes:
- .m2:/root/.m2
stdin_open: true
tty: true