-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (105 loc) · 2.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (105 loc) · 2.33 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '3'
services:
# MySQL container
mysql:
image: mysql:8.0
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: jaringan
MYSQL_DATABASE: appmig
MYSQL_USER: cris
MYSQL_PASSWORD: jaringan
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
mysql-5.7:
image: mysql:5.7
container_name: mysql-5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: skripsi
MYSQL_DATABASE: app
MYSQL_USER: cris
MYSQL_PASSWORD: skripsipassword
ports:
- "3307:3306"
volumes:
- mysql_data_2:/var/lib/mysql
# Redis container
redis:
image: redis:alpine
container_name: redis
restart: always
ports:
- "6379:6379"
# Django container
django:
build: ./migrationTools
container_name: django_rest
restart: always
command: >
sh -c "sleep 30 && python manage.py migrate && python manage.py loaddata fixtures/initials_user.json && python manage.py runserver 0.0.0.0:8000"
environment:
DB_HOST: mysql
DB_PORT: 3306
DB_USER: cris
DB_PASSWORD: jaringan
DB_DB: appmig
REDIS_URL: redis://redis:6379/0
volumes:
- ./migrationTools:/app
ports:
- "8000:8000"
depends_on:
- mysql
- redis
django_worker:
build: ./migrationTools
container_name: django_worker
restart: always
command: "celery -A migrationTools worker --loglevel=info"
environment:
DB_HOST: mysql
DB_PORT: 3306
DB_USER: cris
DB_PASSWORD: jaringan
DB_DB: appmig
REDIS_URL: redis://redis:6379/0
volumes:
- ./migrationTools:/app
depends_on:
- mysql
- redis
# Vue.js container
vue:
build: ./frontend/mysqlMigration/
container_name: vue_app
restart: always
ports:
- "8080:80"
volumes:
- ./frontend/mysqlMigration/:/app
environment:
VUE_APP_API_URL: http://localhost:8000
# Caddy container for reverse proxy
caddy:
image: caddy:latest
container_name: caddy_proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- vue
- django
volumes:
mysql_data:
caddy_data:
caddy_config:
mysql_data_2: