-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (43 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
47 lines (43 loc) · 1.36 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
services:
static_hosting:
image: nginx
volumes:
- ./frontend/dist:/usr/share/nginx/html:ro
- ./settings/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- 80:80
backend:
image: couchdb:3
ports:
- 5984:5984
environment:
- COUCHDB_USER
- COUCHDB_PASSWORD
healthcheck:
test: curl -f http://localhost:5984/_up || exit 1
start_period: 10s
start_interval: 2s
accessible_backend:
image: curlimages/curl
entrypoint: ["/bin/sh","-c"]
command:
- |
alias put="curl -X PUT -u '${COUCHDB_USER}:${COUCHDB_PASSWORD}'"
put backend:5984/_node/nonode@nohost/_config/chttpd/enable_cors --data '"true"'
put backend:5984/_node/nonode@nohost/_config/cors/origins --data '"*"'
put backend:5984/wattpad
put backend:5984/wattpad/_security --data '{"members":{"roles":[]},"admins":{"roles":["_admin"]}}'
depends_on:
backend:
condition: service_healthy
updated_samples:
image: curlimages/curl
entrypoint: ["/bin/sh","-c"]
volumes:
- ./frontend/public/sample_data.json:/sample_data.json
command:
- |
curl -X POST http://backend:5984/qvotidie/_bulk_docs -H "Content-Type: application/json" -d @/sample_data.json
depends_on:
accessible_backend:
condition: service_completed_successfully