This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
/
docker-compose.yml
170 lines (167 loc) · 4.36 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version: '3.2'
# do not change any thing if you do not know what it means
services:
web:
container_name: dcrm_web
hostname: dcrm_web
image: nginx:1.17.6
restart: always
ports:
#- "8080:80" # test
- "80:80" # production
- "443:443" # https
volumes:
- app_static:/usr/share/nginx/html/static
- app_resources:/usr/share/nginx/html/resources
- ./docker/nginx/conf.d:/etc/nginx/conf.d # important: modify nginx conf
- ./docker/nginx/certs:/etc/nginx/certs # your https certs: docker/nginx/certs
depends_on:
- app
- worker-default
- worker-high
links:
- app:dcrm-app
pure-ftpd:
container_name: dcrm_pure-ftpd
hostname: dcrm_pure-ftpd
image: stilliard/pure-ftpd:hardened
restart: always
ports:
- "21:21"
- "30000-30009:30000-30009"
volumes:
- app_upload:/home/dcrm
- ./docker/pure-ftpd/passwd:/etc/pure-ftpd/passwd
#- ./docker/pure-ftpd/ssl:/etc/ssl/private
depends_on:
- app
environment:
PUBLICHOST: localhost
FTP_USER_NAME: dcrm # important: modify your ftp username
FTP_USER_PASS: dcrm_ftp_password # important: modify your ftp password
FTP_USER_HOME: /home/dcrm
#ADDED_FLAGS: "--tls=2"
app:
container_name: dcrm_app
hostname: dcrm_app
restart: always
#ports:
# - "8001:8001"
build: .
tty: true
stdin_open: true
volumes:
- app_static:/usr/src/app/static
- app_resources:/usr/src/app/resources
- app_upload:/usr/src/app/upload
- app_temp:/usr/src/app/temp
- ./.gnupg:/usr/src/app/.gnupg
links:
- db:dcrm-db
- redis:dcrm-redis
- memcached:dcrm-memcached
environment:
PYTHONUNBUFFERED: 1
DCRM_WORKER: none
env_file:
- ./DCRM/.env
- ./docker/DCRM/.env
worker-default:
container_name: dcrm_worker-default
hostname: dcrm_worker-default
restart: always
build: .
deploy:
mode: replicated
replicas: 1
volumes:
- app_static:/usr/src/app/static
- app_resources:/usr/src/app/resources
- app_upload:/usr/src/app/upload
- app_temp:/usr/src/app/temp
- ./.gnupg:/usr/src/app/.gnupg
links:
- db:dcrm-db
- redis:dcrm-redis
- memcached:dcrm-memcached
environment:
PYTHONUNBUFFERED: 1
DCRM_WORKER: default
env_file:
- ./DCRM/.env
- ./docker/DCRM/.env
worker-high:
container_name: dcrm_worker-high
hostname: dcrm_worker-high
restart: always
build: .
deploy:
mode: replicated
replicas: 2
volumes:
- app_static:/usr/src/app/static
- app_resources:/usr/src/app/resources
- app_upload:/usr/src/app/upload
- app_temp:/usr/src/app/temp
- ./.gnupg:/usr/src/app/.gnupg
links:
- db:dcrm-db
- redis:dcrm-redis
- memcached:dcrm-memcached
environment:
PYTHONUNBUFFERED: 1
DCRM_WORKER: high
env_file:
- ./DCRM/.env
- ./docker/DCRM/.env
scheduler:
container_name: dcrm_scheduler
hostname: dcrm_scheduler
restart: always
build: .
volumes:
- app_static:/usr/src/app/static
- app_resources:/usr/src/app/resources
- app_upload:/usr/src/app/upload
- app_temp:/usr/src/app/temp
- ./.gnupg:/usr/src/app/.gnupg
links:
- db:dcrm-db
- redis:dcrm-redis
- memcached:dcrm-memcached
environment:
PYTHONUNBUFFERED: 1
DCRM_WORKER: scheduler
env_file:
- ./DCRM/.env
- ./docker/DCRM/.env
db:
container_name: dcrm_db
hostname: dcrm_db
image: mysql:5.7
restart: always
volumes:
- db_data:/var/lib/mysql
- ./docker/mysql/conf.d:/etc/mysql/conf.d
environment:
MYSQL_ROOT_PASSWORD: dcrm_root_password
MYSQL_DATABASE: DCRM
MYSQL_USER: dcrm
MYSQL_PASSWORD: dcrm_user_password
redis:
container_name: dcrm_redis
hostname: dcrm_redis
image: redis
restart: always
memcached:
container_name: dcrm_memcached
hostname: dcrm_memcached
image: memcached
restart: always
# your data will not lost until you clean these docker volumes
volumes:
db_data: # mysql database
app_static: # static files
app_resources: # debian packages
app_upload: # upload root
app_temp: