-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.dev.yml
84 lines (83 loc) · 2.23 KB
/
docker-compose.dev.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
# Docker-compose setup for local development. This allows for a user
# to modify the Alfalfa worker code and run tests in the Docker
# container without needing to rebuild/restart Docker.
#
# Usage:
# docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
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: .
# The dev instance still needs works, so default to base for now
target: dev
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_URL
- MONGO_DB_NAME
- MONGO_URL
- NODE_ENV=development
- REDIS_HOST
- REGION
- S3_BUCKET
- S3_URL
- S3_URL_EXTERNAL
depends_on:
- goaws
- mc
- mongo
- redis
- worker
volumes:
- ./alfalfa_web:/srv/alfalfa
# create volumes for the build and node_modules so that
# the resources are not copied back to the local host when
# mounting.
- /srv/alfalfa/build
- /srv/alfalfa/node_modules
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: dev
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_URL
- LOGLEVEL=INFO
- MONGO_DB_NAME
- MONGO_URL
- NODE_ENV
- REDIS_HOST
- REGION
- S3_BUCKET
- S3_URL
depends_on:
- goaws
- mc
- mongo
- redis
volumes:
- ./alfalfa_worker:/alfalfa/alfalfa_worker
- ./tests:/alfalfa/tests