-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (109 loc) · 2.66 KB
/
docker-compose.yml
File metadata and controls
109 lines (109 loc) · 2.66 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
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
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
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- GIT_COMMIT
- JOB_QUEUE
- MONGO_URL
- NODE_ENV
- REDIS_URL
- S3_REGION
- S3_BUCKET
- S3_URL
- S3_URL_EXTERNAL
depends_on:
- mc
- mongo
- redis
- worker
# Local implementation of s3
minio:
container_name: alfalfa_minio
image: minio/minio:RELEASE.2024-04-18T19-09-19Z
entrypoint:
- minio
- server
- /data
- --address
- ":9000"
- --console-address
- ":9001"
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_PASSWORD
- INFLUXDB_USERNAME
- INFLUXDB_DB
- INFLUXDB_HOST
- JOB_QUEUE
- LOGLEVEL=INFO
- MONGO_URL
- NODE_ENV
- REDIS_URL
- S3_REGION
- S3_BUCKET
- S3_URL
depends_on:
- mc
- mongo
- redis
mongo:
container_name: alfalfa_mongo
image: mongo:7-jammy
ports:
- "27017:27017"
environment:
# MongoDB container needs these for initialization
- MONGO_INITDB_ROOT_USERNAME
- MONGO_INITDB_ROOT_PASSWORD
- MONGO_INITDB_DATABASE
redis:
container_name: alfalfa_redis
image: redis:7.0.7
ports:
- "6379:6379"