-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
48 lines (44 loc) · 1.13 KB
/
docker-compose.prod.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
45
46
47
48
version: "3.9"
services:
spring-api-image:
# image: nk-learning-platform-reactive-api:latest
image: yan640/nk-learning-platform-reactive-api:lastest
# build:
# context: .
# dockerfile: Dockerfile.prod
container_name: nk-learning-platform-reactive-api
ports:
- "8080:8080"
volumes:
- .:/app
networks:
- spring-network
depends_on:
- mysql
# environment:
# - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/db_e_learning_platform
# - SPRING_DATASOURCE_USERNAME=nk-yannick
# - SPRING_DATASOURCE_PASSWORD=101010
# restart: on-failure
mysql:
image: mysql
container_name: nk-mysql
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: db_e_learning_platform
MYSQL_USER: nk-yannick
MYSQL_PASSWORD: 101010
ports:
- "3307:3306"
networks:
- spring-network
volumes:
- mysql-volume:/var/lib/mysql
- ./config/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./init-db-scripts:/docker-entrypoint-initdb.d
restart: on-failure
networks:
spring-network:
driver: bridge
volumes:
mysql-volume: