-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (49 loc) · 1.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (49 loc) · 1.59 KB
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
40
41
42
43
44
45
46
47
48
49
50
version: "3.8"
services:
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
mysqldb:
platform: linux/amd64
image: mysql
restart: unless-stopped
env_file: ./.env
environment:
- MYSQL_ROOT_PASSWORD=$MYSQLDB_ROOT_PASSWORD
- MYSQL_DATABASE=$MYSQLDB_DATABASE
ports:
- $MYSQLDB_PORT:$MYSQLDB_PORT_DOCKER
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 30s
retries: 3
app:
depends_on:
mysqldb:
condition: service_healthy
redis:
condition: service_started
restart: on-failure
image: book-store
build: .
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
- $SPRING_DEBUGING_PORT:$SPRING_DEBUGING_PORT
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "$SPRING_DATASOURSE_URL",
"spring.datasource.username" : "$MYSQLDB_USER",
"spring.datasource.password" : "$MYSQLDB_ROOT_PASSWORD",
"spring.jpa.properties.hibernate.dialect" : "$SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT",
"spring.datasource.driver-class-name" : "$SPRING_DATASOURSE_DRIVER_CLASS_NAME",
"spring.jpa.hibernate.ddl-auto" : "$SPRING_JPA_HIBERNATE_DDL_AUTO",
"jwt.access.expiration": "$JWT_ACCESS_EXPIRATION_MS",
"jwt.refresh.expiration": "$JWT_REFRESH_EXPIRATION_MS",
"jwt.secret": "$JWT_SECRET",
"spring.data.redis.host": "redis",
"spring.data.redis.port": 6379
}'
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"