-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
29 lines (26 loc) · 1.11 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
# Dockerc compose only for developing purpose
version: "3.8"
services:
couchdb:
build:
context: ./couchdb
dockerfile: Dockerfile
container_name: hr_couchdb
ports:
- "5984:5984"
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=password
dbinit:
image: curlimages/curl
container_name: hr_couchdb_init
depends_on:
- couchdb
command: >
sh -c
"sleep 5s &&
curl -X PUT http://admin:password@couchdb:5984/_global_changes &&
curl -X PUT http://admin:password@couchdb:5984/_users/_security -d '{}' &&
curl -X PUT http://admin:password@couchdb:5984/hospitalrun?partitioned=false &&
curl -X PUT http://admin:password@couchdb:5984/hospitalrun/_security -d '{\"members\": {}, \"admins\": {\"roles\": [\"_admin\"] }}' &&
curl -X PUT http://admin:password@couchdb:5984/_users/org.couchdb.user:username -H \"Accept: application/json\" -H \"Content-Type: application/json\" -d '{\"name\": \"username\", \"password\": \"password\", \"metadata\": { \"givenName\": \"John\", \"familyName\": \"Doe\"}, \"roles\": [], \"type\": \"user\"}'"