-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (62 loc) · 1.53 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
63
64
65
66
67
version: '3.1'
services:
cache:
build:
context: ./redis_db
image: jeshocarmel/mysimpleapp_cache
networks:
- cache-tier
volumes:
- cache_data:/dump.rdb
tty: true
container_name: mysimpleapp_cache
db:
build:
context: ./mysql_db
image: jeshocarmel/mysimpleapp_db
volumes:
- db_data:/var/lib/mysql
networks:
- back-tier
environment:
TZ: Asia/Singapore
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_password
MYSQL_DATABASE: simple_db
command:
--explicit_defaults_for_timestamp
--default-authentication-plugin=mysql_native_password
secrets:
- mysql_password
tty: true
container_name: mysimpleapp_db
app:
build:
context: ./app
image: jeshocarmel/mysimpleapp_app
environment:
WAIT_HOSTS: db:3306
MYSQL_DATABASE: simple_db
depends_on:
- cache
- db
networks:
- back-tier
- cache-tier
ports:
- "80:80"
tty: true
container_name: mysimpleapp_app
secrets:
- mysql_password
- redis_password
volumes:
cache_data:
db_data:
networks:
cache-tier:
back-tier:
secrets:
mysql_password:
file: ./devsecrets/mysql_password
redis_password:
file: ./devsecrets/redis_password