-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
112 lines (112 loc) · 2.69 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
105
106
107
108
109
110
111
112
version: "3.4"
services:
web: # main haystack application
container_name: alfalfa_web
build:
# the purpose of context one level above dockerfile
# is to utilize shared code, specifically in db
dockerfile: alfalfa_web/Dockerfile
context: .
target: base
args:
- NODE_ENV
image: ${REGISTRY_BASE_URI}/web:${VERSION_TAG}
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- "29043:29043"
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- GIT_COMMIT
- JOB_QUEUE
- MONGO_DB_NAME
- MONGO_URL
- NODE_ENV
- REDIS_HOST
- REGION
- S3_BUCKET
- S3_URL
- S3_URL_EXTERNAL
depends_on:
- goaws
- mc
- mongo
- redis
- worker
# Provides a local queue, conforming to AWS Queue (SQS) API
goaws:
container_name: alfalfa_goaws
image: pafortin/goaws:v0.3.1
ports:
- "4100:4100"
# Local implementation of s3
minio:
container_name: alfalfa_minio
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
entrypoint:
- minio
- server
- /data
ports:
- "9000:9000"
environment:
- MINIO_ACCESS_KEY=${AWS_ACCESS_KEY_ID}
- MINIO_SECRET_KEY=${AWS_SECRET_ACCESS_KEY}
mc:
container_name: alfalfa_mc
image: minio/mc:RELEASE.2022-12-13T00-23-28Z
environment:
- MINIO_ACCESS_KEY=${AWS_ACCESS_KEY_ID}
- MINIO_SECRET_KEY=${AWS_SECRET_ACCESS_KEY}
entrypoint: >
/bin/sh -c "
sleep 5;
mc config host add myminio http://minio:9000 $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY};
mc mb -p myminio/alfalfa;
mc anonymous set 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 and start_worker.sh files in the `deploy` directory
dockerfile: alfalfa_worker/Dockerfile
context: .
target: base
image: ${REGISTRY_BASE_URI}/worker:${VERSION_TAG}
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- HISTORIAN_ENABLE
- INFLUXDB_ADMIN_PASSWORD
- INFLUXDB_ADMIN_USER
- INFLUXDB_DB
- INFLUXDB_HOST
- JOB_QUEUE
- LOGLEVEL=INFO
- MONGO_DB_NAME
- MONGO_URL
- NODE_ENV
- REDIS_HOST
- REGION
- S3_BUCKET
- S3_URL
depends_on:
- goaws
- mc
- mongo
- redis
mongo:
container_name: alfalfa_mongo
image: mongo:6.0.6
ports:
- "27017:27017"
redis:
container_name: alfalfa_redis
image: redis:7.0.7
ports:
- "6379:6379"