-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose.yml
86 lines (81 loc) · 2.34 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
version: "3.7"
services:
urltopng:
image: jasonraimondi/url-to-png
build: .
ports:
- 3089:3089
environment:
METRICS: true
LOG_LEVEL: debug
NODE_ENV: debug
BROWSER_WAIT_UNTIL: networkidle
# STORAGE_PROVIDER: s3
# AWS_ACCESS_KEY_ID: miniominiominio
# AWS_SECRET_ACCESS_KEY: miniominiominio
# AWS_DEFAULT_REGION: us-east-1
# AWS_ENDPOINT_URL_S3: http://minio:9000
# AWS_FORCE_PATH_STYLE: true
# AWS_BUCKET: url-to-png-uploads
STORAGE_PROVIDER: couchdb
COUCH_DB_PROTOCOL: http
COUCH_DB_HOST: couchdb
COUCH_DB_PORT: 5984
COUCH_DB_USER: admin
COUCH_DB_PASS: password
couchdb:
image: couchdb
ports:
- 5984:5984
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=password
volumes:
- couchdb-data:/opt/couchdb/data
couchdb-sidecar:
image: curlimages/curl
depends_on:
- couchdb
command: |
sh -c "
until curl -f http://admin:password@couchdb:5984/_up; do
echo 'Waiting for CouchDB to be ready...';
sleep 1;
done;
echo 'CouchDB is ready, creating databases...';
curl -X PUT http://admin:password@couchdb:5984/_users;
curl -X PUT http://admin:password@couchdb:5984/_replicator;
curl -X PUT http://admin:password@couchdb:5984/_global_changes;
curl -X PUT http://admin:password@couchdb:5984/images;
echo 'Databases created successfully.';
"
minio:
image: minio/minio
command: ["server", "/data", "--console-address", ":9001"]
ports:
- 9000:9000
- 9001:9001
volumes:
- minio-config:/root/.minio
- minio-data:/data
environment:
MINIO_ROOT_USER: miniominiominio
MINIO_ROOT_PASSWORD: miniominiominio
MINIO_HTTP_TRACE: /dev/stdout
minio-mc:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host rm local;
/usr/bin/mc config host add --quiet --api s3v4 local http://minio:9000 miniominiominio miniominiominio;
/usr/bin/mc rb --force local/url-to-png-uploads/;
/usr/bin/mc mb --quiet local/url-to-png-uploads/;
/usr/bin/mc policy set public local/url-to-png-uploads;
exit 0;
"
volumes:
couchdb-data:
minio-config:
minio-data: