-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (51 loc) · 1.49 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
45
46
47
48
49
50
51
52
53
54
version: '3.7'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: register-app
image: 'register-app:latest'
ports:
- '8080:8080'
environment:
- spring.data.redis.host=session-db
- spring.data.redis.port=6379
- spring.jpa.hibernate.ddl-auto=create-drop
- spring.datasource.url=jdbc:mysql://user-db:3306/logintest?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true
- spring.datasource.username=root
- spring.datasource.password=root123
- server.port=8080
- spring.application.name=register-app
- spring.session.timeout=10
- spring.session.redis.namespace=user
depends_on:
- session-db
- user-db
networks:
- register-app-network
session-db:
image: redis:latest
container_name: redis-db
ports:
- '6379:6379'
networks:
- register-app-network
user-db:
container_name: user-db
image: 'mysql:latest'
restart: always
ports:
- '3306:3306'
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root123
MYSQL_PASSWORD: root123
networks:
- register-app-network
networks:
register-app-network:
driver: bridge
volumes:
mysql-data: