forked from Netflix/consoleme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
69 lines (68 loc) · 2.73 KB
/
docker-compose.yaml
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
version: "3"
# Never use this in a production environment.
services:
consoleme:
build: .
ports:
- "3000:3000"
tty: true
stdin_open: true
volumes:
- .:/apps/consoleme:delegated
- ~/.aws:/root/.aws:cached
- ~/.ssh:/root/.ssh:cached
- ~/.config/consoleme:/etc/consoleme/
# We shouldn't be using node_modules from host : https://medium.com/@semur.nabiev/how-to-make-docker-compose-volumes-ignore-the-node-modules-directory-99f9ec224561
- /apps/consoleme/node_modules/
- /apps/consoleme/ui/node_modules/
environment:
- CONFIG_LOCATION=${CONFIG_LOCATION:-/apps/consoleme/example_config/example_config_docker_development.yaml}
- EC2_REGION=${EC2_REGION:-us-east-1}
- SETUPTOOLS_USE_DISTUTILS=stdlib
# Run commands to install Consoleme, run the service, and never exit in the event of failure (For dev debugging)
# We're running `FORCE_COLOR=true yarn --cwd /apps/consoleme/ui/ start | cat` instead of
# `yarn --cwd /apps/consoleme/ui/ start` to prevent Yarn from clearing the console, as this affects how docker logs
# are displayed
command: >
bash -c '
python scripts/retrieve_or_decode_configuration.py;
pip install argh watchdog;
watchmedo auto-restart --recursive --pattern="*.py" --directory="." python consoleme/__main__.py &
FORCE_COLOR=true yarn --cwd /apps/consoleme/ui/ start | cat'
depends_on:
- consoleme-redis
- consoleme-dynamodb
links:
- consoleme-redis
- consoleme-dynamodb
consoleme-celery:
build: .
tty: true
stdin_open: true
volumes:
- .:/apps/consoleme:delegated
- ~/.aws:/root/.aws:cached
- ~/.ssh:/root/.ssh:cached
- ~/.config/consoleme:/etc/consoleme/
# We shouldn't be using node_modules from host : https://medium.com/@semur.nabiev/how-to-make-docker-compose-volumes-ignore-the-node-modules-directory-99f9ec224561
- /apps/consoleme/node_modules/
- /apps/consoleme/ui/node_modules/
environment:
- CONFIG_LOCATION=${CONFIG_LOCATION:-/apps/consoleme/example_config/example_config_docker_development.yaml}
- EC2_REGION=${EC2_REGION:-us-east-1}
- SETUPTOOLS_USE_DISTUTILS=stdlib
- COLUMNS=80 # Needed for Celery: https://github.com/celery/celery/issues/5761
# Run Redis with ConsoleMe configuration
command: >
bash -c '
python scripts/retrieve_or_decode_configuration.py;
python scripts/initialize_dynamodb_oss.py;
python scripts/initialize_redis_oss.py;
celery -A consoleme.celery_tasks.celery_tasks worker -l DEBUG -B -E --concurrency=8
'
depends_on:
- consoleme-redis
- consoleme-dynamodb
links:
- consoleme-redis
- consoleme-dynamodb