forked from NREL/alfalfa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
104 lines (103 loc) · 2.33 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
version: '3.2'
services:
web: # main haystack application
build:
# the purpose of context one level above dockerfile
# is to utilize shared code, specifically in db
dockerfile: alfalfa_web/Dockerfile
context: .
args:
- NODE_ENV
image: ${WEB_REGISTRY_URI}:${VERSION_TAG}
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- "29043:29043"
environment:
- NODE_ENV
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- JOB_QUEUE_URL
- MONGO_URL
- MONGO_DB_NAME
- S3_URL
- S3_URL_EXTERNAL
- REDIS_HOST
- S3_BUCKET
- REGION
depends_on:
- redis
- mongo
- goaws
- worker
- mc
# Provides a local queue, conforming to aws Queue API
goaws:
image: pafortin/goaws
ports:
- "4100:4100"
# Local implementation of s3
minio:
image: minio/minio
entrypoint:
- minio
- server
- /data
ports:
- "9000:9000"
environment:
- MINIO_ACCESS_KEY=${AWS_ACCESS_KEY_ID}
- MINIO_SECRET_KEY=${AWS_SECRET_ACCESS_KEY}
mc:
image: minio/mc
environment:
- MINIO_ACCESS_KEY=${AWS_ACCESS_KEY_ID}
- MINIO_SECRET_KEY=${AWS_SECRET_ACCESS_KEY}
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc config host add myminio http://minio:9000 $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY};
/usr/bin/mc mb myminio/alfalfa;
/usr/bin/mc policy public myminio/alfalfa;
"
depends_on:
- minio
worker:
build:
# the purpose of context one level above is to install the entire alfalfa package
# and to copy the wait-for-it.sh file in deploy
dockerfile: alfalfa_worker/Dockerfile
context: .
image: ${WORKER_REGISTRY_URI}:${VERSION_TAG}
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- JOB_QUEUE_URL
- MONGO_URL
- MONGO_DB_NAME
- LOGLEVEL=INFO
- NODE_ENV
- S3_URL
- REDIS_HOST
- S3_BUCKET
- REGION
- INFLUXDB_DB
- INFLUXDB_HOST
- INFLUXDB_ADMIN_USER
- INFLUXDB_ADMIN_PASSWORD
- HISTORIAN_ENABLE
depends_on:
- redis
- mongo
- goaws
- mc
mongo:
image: mongo
ports:
- "27017:27017"
redis:
image: redis
ports:
- "6379:6379"