-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
38 lines (36 loc) · 1.04 KB
/
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
38
version: "3.8"
services:
postgresdb:
image: postgres
restart: unless-stopped
env_file: ./.env
environment:
- POSTGRES_USER=$POSTGRESDB_USER
- POSTGRES_PASSWORD=$POSTGRESDB_ROOT_PASSWORD
- POSTGRES_DB=$POSTGRESDB_DATABASE
ports:
- $POSTGRESDB_LOCAL_PORT:$POSTGRESDB_DOCKER_PORT
volumes:
- db:/var/lib/postgres
app:
depends_on:
- postgresdb
build: ./bezkoder-app
restart: on-failure
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:postgresql://postgresdb:$POSTGRESDB_DOCKER_PORT/$POSTGRESDB_DATABASE",
"spring.datasource.username" : "$POSTGRESDB_USER",
"spring.datasource.password" : "$POSTGRESDB_ROOT_PASSWORD",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.PostgreSQLDialect",
"spring.jpa.hibernate.ddl-auto" : "update"
}'
volumes:
- .m2:/root/.m2
stdin_open: true
tty: true
volumes:
db: