-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 978 Bytes
/
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
version: "3.7"
services:
spring_boot:
container_name: spring_boot
image: ${SPRING_BOOT_IMAGE}
expose:
- "3306"
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: ${MYSQL_URL}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD}
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PASSWORD: ${REDIS_PASSWORD}
FRONTEND_BASE-URL: ${DEV_BASE_URL}
depends_on:
- db
db:
image: mysql:latest
container_name: db
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
expose:
- "3306"
ports:
- "3306:3306"
volumes:
- my-db:/var/lib/mysql
redis:
image: redis:latest
container_name: redis
command: redis-server --requirepass ${REDIS_PASSWORD}
expose:
- "6379"
ports:
- "6379:6379"
volumes:
my-db: