-
Notifications
You must be signed in to change notification settings - Fork 16
/
staging.yml
87 lines (87 loc) · 2.38 KB
/
staging.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
services:
db:
restart: always
redis:
restart: always
elasticsearch:
restart: always
environment:
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02
- cluster.initial_master_nodes=elasticsearch,es02
volumes:
- esdata1:/usr/share/elasticsearch/data
# FIXME: duplication bad
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}
restart: always
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=elasticsearch,es02
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./deploy/elasticsearch.conf.d/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
- esdata2:/usr/share/elasticsearch/data
vite:
build: frontend
image: comses/vite:${RELEASE_VERSION}
command: ["npm", "run", "build"]
environment:
NODE_ENV: "production"
volumes:
- ./frontend/src:/code/src
- ./frontend/package-lock.json:/code/package-lock.json
nginx:
image: nginx:stable
restart: always
volumes:
- ./deploy/nginx/nginx-staging.conf:/etc/nginx/nginx.conf
- ./deploy/nginx/uwsgi_params:/etc/nginx/uwsgi_params
- ./deploy/nginx/well-known:/srv/.well-known
- ./docker/shared/logs/nginx:/var/log/nginx
- ./docker/shared/static:/srv/static
- ./docker/shared/media:/srv/media
- ./docker/shared/library:/library
- sockets:/shared/sockets
command: ["nginx", "-g", "daemon off;"]
ports:
- "80:80"
depends_on:
- server
server:
build:
context: ./django
args:
REQUIREMENTS_FILE: requirements-dev.txt
UBUNTU_MIRROR: "mirror.it.ubc.ca"
RUN_SCRIPT: "./deploy/prod.sh"
image: comses/server:${RELEASE_VERSION}
restart: always
volumes:
- sockets:/shared/sockets
environment:
DJANGO_SETTINGS_MODULE: "core.settings.staging"
ports:
- "127.0.0.1:9191:9191" # uWSGI stats server
depends_on:
vite:
condition: service_completed_successfully
elasticsearch:
condition: service_healthy
volumes:
sockets:
driver: local
esdata1:
driver: local
esdata2:
driver: local