-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (38 loc) · 1.31 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
39
version: "3.8"
services:
postgresdb:
platform: linux/arm64
image: postgres
restart: unless-stopped
env_file: ./.env
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DATABASE
ports:
- $POSTGRES_LOCAL_PORT:$POSTGRES_DOCKER_PORT
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres"]
timeout: 30s
retries: 3
app:
depends_on:
postgresdb:
condition: service_healthy
restart: on-failure
image: booking_service
build: .
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
- $DEBUG_PORT:$DEBUG_PORT
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:postgresql://postgresdb:$POSTGRES_DOCKER_PORT/$POSTGRES_DATABASE",
"spring.datasource.username" : "$POSTGRES_USER",
"spring.datasource.password" : "$POSTGRES_PASSWORD",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.PostgreSQLDialect",
"spring.datasource.driver-class-name" : "org.postgresql.Driver",
"spring.jpa.hibernate.ddl-auto" : "validate"
}'
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"