forked from mitodl/micromasters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (97 loc) · 2.35 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
version: '2.1'
services:
db:
image: postgres:9.6
ports:
- "5432"
redis:
image: redis:3.0.3
ports:
- "6379"
elastic:
image: elasticsearch:6.7.1
command: elasticsearch -E network.host=0.0.0.0 -E http.cors.enabled=true -E http.cors.allow-origin=* -E rest.action.multi.allow_explicit_index=false
user: elasticsearch
ports:
- "9100:9200"
nginx:
image: nginx:1.9.5
ports:
- "8079:8079"
links:
- web
python:
build:
context: .
dockerfile: Dockerfile
command: /bin/true
environment:
DEBUG: 'False'
NODE_ENV: 'production'
DEV_ENV: 'True' # necessary to have nginx connect to web container
PORT: 8077
COVERAGE_DIR: htmlcov
DATABASE_URL: postgres://postgres@db:5432/postgres
MICROMASTERS_SECURE_SSL_REDIRECT: 'False'
MICROMASTERS_DB_DISABLE_SSL: 'True'
ELASTICSEARCH_URL: elastic:9200
CELERY_ALWAYS_EAGER: 'False'
BROKER_URL: redis://redis:6379/4
CELERY_RESULT_BACKEND: redis://redis:6379/4
EXAMS_SFTP_HOST: sftp
EXAMS_SFTP_USERNAME: odl
EXAMS_SFTP_PASSWORD: 123
DOCKER_HOST: ${DOCKER_HOST:-missing}
WEBPACK_DEV_SERVER_HOST: ${WEBPACK_DEV_SERVER_HOST:-localhost}
env_file: .env
web:
image: micromasters_python
extends:
service: python
command: >
/bin/bash -c '
sleep 3 &&
python3 manage.py collectstatic --noinput &&
python3 manage.py migrate --no-input &&
uwsgi uwsgi.ini --honour-stdin'
stdin_open: true
tty: true
ports:
- "8077:8077"
links:
- db
- elastic
- redis
- sftp
watch:
build:
context: .
dockerfile: Dockerfile-node
working_dir: /src
command: >
/bin/bash -c './webpack_dev_server.sh --install'
ports:
- "8078:8078"
environment:
NODE_ENV: 'productions'
DOCKER_HOST: ${DOCKER_HOST:-missing}
CONTAINER_NAME: 'watch'
env_file: .env
celery:
image: micromasters_python
extends:
service: python
command: >
/bin/bash -c '
sleep 3;
celery -A micromasters.celery:app worker -B -l ${MICROMASTERS_LOG_LEVEL:-INFO}'
links:
- db
- elastic
- redis
- sftp
sftp:
image: atmoz/sftp
ports:
- "2022:22"
command: odl:123:1001:1001:results,results/topvue