-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
143 lines (131 loc) · 3.64 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: "3.5"
services:
db:
image: postgres:9.6
environment:
- POSTGRES_DB=richie_${RICHIE_SITE:-funmooc}
env_file:
- "env.d/development"
ports:
- "5440:5432"
volumes:
- ./data/db/${RICHIE_SITE:-funmooc}:/var/lib/postgresql/data
elasticsearch:
image: fundocker/openshift-elasticsearch:6.6.2
environment:
- discovery.type=single-node
env_file:
- "env.d/development"
ports:
- "9220:9200"
app-dev:
build:
context: .
target: development
args:
DOCKER_USER: ${DOCKER_USER:-1000}
SITE: ${RICHIE_SITE:-funmooc}
image: "${RICHIE_SITE:-funmooc}:development"
environment:
- DB_NAME=richie_${RICHIE_SITE:-funmooc}
- DJANGO_SETTINGS_MODULE=${RICHIE_SITE:-funmooc}.settings
- DJANGO_CONFIGURATION=Development
- RICHIE_ES_INDICES_PREFIX=richie_${RICHIE_SITE:-funmooc}
env_file: env.d/development
networks:
- default
- lms_outside
ports:
- "8070:8000"
volumes:
- "./sites/${RICHIE_SITE:-funmooc}/src/backend:/app"
- "./data/media/${RICHIE_SITE:-funmooc}:/data/media"
depends_on:
- "db"
- "elasticsearch"
- "redis-sentinel"
user: ${DOCKER_USER:-1000}
app:
build:
context: .
target: production
args:
DOCKER_USER: ${DOCKER_USER:-1000}
SITE: ${RICHIE_SITE:-funmooc}
# We tag our images with the current commit sha1 in the CI to make them
# unique and avoid collisions in parallel builds.
image: "${RICHIE_SITE:-funmooc}:production"
environment:
- DB_NAME=richie_${RICHIE_SITE:-funmooc}
- DJANGO_SETTINGS_MODULE=${RICHIE_SITE:-funmooc}.settings
- DJANGO_CONFIGURATION=ContinuousIntegration
- RICHIE_ES_INDICES_PREFIX=richie_${RICHIE_SITE:-funmooc}
env_file: env.d/development
networks:
- default
- lms_outside
volumes:
- ./data/media/${RICHIE_SITE:-funmooc}:/data/media
depends_on:
- "db"
- "elasticsearch"
- "redis-sentinel"
user: ${DOCKER_USER:-1000}
nginx:
build:
context: .
target: nginx
args:
DOCKER_USER: ${DOCKER_USER:-1000}
NGINX_IMAGE_NAME: ${NGINX_IMAGE_NAME:-fundocker/openshift-nginx}
NGINX_IMAGE_TAG: ${NGINX_IMAGE_TAG:-1.13}
SITE: ${RICHIE_SITE:-funmooc}
image: "${RICHIE_SITE:-funmooc}-nginx:production"
ports:
- "8081:8081"
volumes:
- ./docker/files/etc/nginx/conf.d:/etc/nginx/conf.d:ro
- ./data/media/${RICHIE_SITE:-funmooc}:/data/media:ro
depends_on:
- app
dockerize:
image: jwilder/dockerize
node:
image: node:16.15
working_dir: /app/src/frontend
user: ${DOCKER_USER:-1000}
volumes:
- ./sites/${RICHIE_SITE:-funmooc}:/app
terraform-state:
image: hashicorp/terraform:latest
env_file: env.d/aws
user: ${DOCKER_USER:-1000}
working_dir: /app
volumes:
- ./aws/create_state_bucket:/app
terraform:
image: hashicorp/terraform:0.12.31
environment:
- TF_VAR_SITE=${RICHIE_SITE:-funmooc}
- TF_DATA_DIR=/config
env_file: env.d/aws
user: ${DOCKER_USER:-1000}
working_dir: /app
volumes:
- ./aws:/app
- ./sites/${RICHIE_SITE:-funmooc}/aws:/config
redis-sentinel:
image: docker.io/bitnami/redis-sentinel:6.0-debian-10
environment:
- REDIS_MASTER_HOST=redis-primary
depends_on:
- redis-primary
redis-primary:
image: docker.io/bitnami/redis:6.0-debian-10
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_REPLICATION_MODE=master
networks:
lms_outside:
driver: bridge
name: "${RICHIE_LMS_NETWORK:-edx_outside}"