-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.admin.yml
190 lines (171 loc) · 4.73 KB
/
docker-compose.admin.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
version: "3"
services:
certgen-prod:
build: ./dockerfiles/certbot/
logging:
driver: "${SETUP_LOGGING_DRIVER}"
ports:
- "80:80"
volumes:
- prodcerts:/etc/letsencrypt
environment:
- DOMAIN
- LETSENCRYPT_EMAIL
certgen-dev:
build: ./dockerfiles/certgen-dev/
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- devcerts:/root
setup-couchdb-dev:
image: mhart/alpine-node:6.0.0
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- ./setup/couchdb:/root
command: node /root/setup.js
environment:
- COUCHDB_HOSTNAME=couchdb
- COUCHDB_DATABASE
- COUCHDB_PASSWORD
- COUCHDB_USER
- COUCHDB_PORT=5984
external_links:
- poltergeist_couchdb_1
networks:
- default
- poltergeist_default
setup-couchdb-prod:
image: mhart/alpine-node:6.0.0
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- ./setup/couchdb:/root
command: node /root/setup.js
environment:
- NODE_ENV
- DOMAIN
- COUCHDB_DATABASE
- COUCHDB_PASSWORD
- COUCHDB_USER
- COUCHDB_HOSTNAME
backup-couchdb:
image: alpine:3.5
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- couchdb:/opt/couchdb/data
- ./volumes/couchdb:/opt/couchdb/backup
command: tar cvf /opt/couchdb/backup/backup.tar /opt/couchdb/data
restore-couchdb:
image: alpine:3.5
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- couchdb:/opt/couchdb/data
- ./volumes/couchdb:/opt/couchdb/backup
command: /bin/sh -c "cd /opt && tar xvf /opt/couchdb/backup/backup.tar --strip 1"
import-couchdb-articles:
image: mhart/alpine-node:6.0.0
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- ./setup/importdb:/root
- ./volumes/couchdb/import:/root/import
command: /bin/sh -c "cd /root && npm start"
environment:
- COUCHDB_HOSTNAME=couchdb
- COUCHDB_DATABASE
- COUCHDB_PASSWORD
- COUCHDB_USER
- COUCHDB_PORT=5984
- COUCHDB_DOCUMENT_PREFIX=${COUCHDB_ARTICLE_PREFIX}
- IMPORT_DIR=import/articles
external_links:
- poltergeist_couchdb_1
networks:
- default
- poltergeist_default
import-couchdb-pages:
image: mhart/alpine-node:6.0.0
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- ./setup/importdb:/root
- ./volumes/couchdb/import:/root/import
command: /bin/sh -c "cd /root && npm start"
environment:
- COUCHDB_HOSTNAME=couchdb
- COUCHDB_DATABASE
- COUCHDB_PASSWORD
- COUCHDB_USER
- COUCHDB_PORT=5984
- COUCHDB_DOCUMENT_PREFIX=${COUCHDB_PAGE_PREFIX}
- IMPORT_DIR=import/pages
external_links:
- poltergeist_couchdb_1
networks:
- default
- poltergeist_default
backup-redis:
image: alpine:3.5
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- redis:/data
- ./volumes/redis:/opt/backup
command: tar cvf /opt/backup/backup.tar /data
restore-redis:
image: alpine:3.5
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- redis:/data
- ./volumes/redis:/opt/backup
command: /bin/sh -c "cd / && tar xvf /opt/backup/backup.tar"
backup-elasticsearch:
image: alpine:3.5
volumes:
- elasticsearch:/usr/share/elasticsearch/data
- ./volumes/elasticsearch:/opt/backup
command: tar cvf /opt/backup/backup.tar /usr/share/elasticsearch/data
restore-elasticsearch:
image: alpine:3.5
volumes:
- elasticsearch:/usr/share/elasticsearch/data
- ./volumes/elasticsearch:/opt/backup
command: /bin/sh -c "cd /usr && tar xvf /opt/backup/backup.tar --strip 1"
backup-prodcerts:
image: alpine:3.5
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- prodcerts:/etc/letsencrypt
- ./volumes/letsencrypt:/opt/letsencrypt/backup
command: tar cvf /opt/letsencrypt/backup/backup.tar /etc/letsencrypt
restore-prodcerts:
image: alpine:3.5
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- prodcerts:/etc/letsencrypt
- ./volumes/letsencrypt:/opt/letsencrypt/backup
command: /bin/sh -c "cd /etc && tar xvf /opt/letsencrypt/backup/backup.tar --strip 1"
setup-api-dev:
image: mhart/alpine-node:6.0.0
logging:
driver: "${SETUP_LOGGING_DRIVER}"
volumes:
- ./:/poltergeist
command: /bin/sh -c "apk add --no-cache git && npm i -g lerna && cd /poltergeist && lerna bootstrap"
# command: /bin/sh -c "ping google.com"
#TODO: container for automatic, recurring backups to S3/GCS
volumes:
couchdb:
devcerts:
prodcerts:
redis:
elasticsearch:
networks:
poltergeist_default:
external: true