-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
31 lines (29 loc) · 1.06 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
version: '3.9'
services:
mysql-db:
image: mysql:latest
restart: unless-stopped
env_file: ./.env
environment:
MYSQL_ROOT_PASSWORD: $MYSQLDB_ROOT_PASS
MYSQL_DATABASE: $MYSQLDB_DATABASE
ports:
- $MYSQLDB_LOCAL_PORT:$MYSQLDB_DOCKER_PORT
app:
depends_on:
- mysql-db
restart: on-failure
image: car-sharing:latest
build: .
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
environment:
SPRING_APPLICATION_JSON: '{"spring.datasource.url":"jdbc:mysql://mysql-db:3306/$MYSQLDB_DATABASE?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",
"spring.datasource.username":"$MYSQLDB_USER",
"spring.datasource.password":"$MYSQLDB_ROOT_PASS",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.MySQL8Dialect",
"spring.jpa.hibernate.ddl-auto" : "validate"}'
TOKEN_SIGNING_KEY: ${TOKEN_SIGNING_KEY}
telegram.bot.name: ${BOT_NAME}
telegram.bot.token: ${BOT_TOKEN}