-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
62 lines (57 loc) · 1.14 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
55
56
57
58
59
60
61
62
version: "3"
services:
sms-svc:
container_name: sms-svc
build:
context: .
image: "sms-svc:latest"
networks:
- sms-svc
- cache
depends_on:
- sms-db
- sms-cache
ports:
- "3000:3000"
environment:
DATABASE_HOST: sms-db
DATABASE_PORT: "3306"
REDIS_HOST: sms-cache
REDIS_PORT: 6379
sms-db:
container_name: sms_mysql
image: mysql:5.7
# ports:
# - "3406:3306"
expose:
- "3306"
networks:
- sms-svc
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DATABASE: ${DATABASE_DB}
volumes:
- ./mysql-dump/data:/var/lib/mysql
- ./mysql-dump:/docker-entrypoint-initdb.d
sms-cache:
container_name: sms_cache
image: redis:6.0.8
# ports:
# - "${REDIS_PORT}:6379"
networks:
- sms-svc
- cache
expose:
- "6379"
entrypoint: redis-server --appendonly yes
restart: "always"
volumes:
- ./redis-data:/data
volumes:
mysql-dump:
redis-data:
networks:
sms-svc:
cache: