-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (44 loc) · 1.59 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
40
41
42
43
44
name: car-sharing-application
services:
mysqldb:
image: mysql:8.0.36-oracle
restart: unless-stopped
env_file:
- ./.env
environment:
- MYSQL_DATABASE=$MYSQLDB_DATABASE
- MYSQL_ROOT_PASSWORD=$MYSQLDB_ROOT_PASSWORD
ports:
- $MYSQLDB_LOCAL_PORT:$MYSQLDB_DOCKER_PORT
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h localhost -u${MYSQLDB_USER} -p${MYSQLDB_ROOT_PASSWORD}" ]
interval: 30s
timeout: 30s
retries: 30
app:
depends_on:
- mysqldb
image: car-sharing-image
restart: on-failure
container_name: app
build: .
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
- $DEBUG_PORT:$DEBUG_PORT
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:mysql://mysqldb:$MYSQLDB_DOCKER_PORT/$MYSQLDB_DATABASE?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=UTC",
"spring.datasource.username" : "$MYSQLDB_USER",
"spring.datasource.password" : "$MYSQLDB_ROOT_PASSWORD",
"spring.jpa.hibernate.ddl-auto" : "validate",
"spring.jpa.show-sql" : "true",
"jwt.expiration" : "$JWT_EXPIRATION_TIME",
"jwt.secret" : "$JWT_SECRET",
"STRIPE_APY_KEY" : "$STRIPE_APY_KEY",
"STRIPE_SUCCESS_LINK" : "$STRIPE_SUCCESS_LINK",
"STRIPE_CANCEL_LINK" : "$STRIPE_CANCEL_LINK",
"TELEGRAM_BOT_TOKEN" : "$TELEGRAM_BOT_TOKEN",
"TELEGRAM_BOT_USERNAME" : "$TELEGRAM_BOT_USERNAME"
}'
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"