Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
97 lines (97 loc) · 3.26 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
97 lines (97 loc) · 3.26 KB
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
version: '3.8'
# Local development stack (make dev-up). Plain HTTP, and by default every
# published port is bound to 127.0.0.1 so nothing is reachable from the rest of
# the network (DEV_PROXY_BIND in .env can change the proxy's binding).
services:
reverseProxy:
container_name: gradeview-reverse-proxy
image: ${CI_REGISTRY_IMAGE:-gradeview}/reverse-proxy:${REVERSE_PROXY_VERSION:-development}
build: ./reverseProxy
volumes:
- ${SOCKETS_DIR:-/dev/null}:/run/sockets
environment:
# HTTP-only template; the image default is the production HTTPS template.
- NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/templates/development
- NGINX_SERVER_NAME=${NGINX_SERVER_NAME:-gradeview.eecs.berkeley.edu}
networks:
- frontend
- concept_map_integration
ports:
# host address:port for the dev proxy (default http://localhost:80).
# The old REVERSE_PROXY_LISTEN variable (0.0.0.0:80 in old .env files) is
# deliberately not read, so stale values cannot expose the proxy.
- ${DEV_PROXY_BIND:-127.0.0.1:80}:80
depends_on:
- web
- api
- dtgui-progress-report
web:
container_name: gradeview-web
image: ${CI_REGISTRY_IMAGE:-gradeview}/web:${WEB_VERSION:-development}
build: ./website/server
volumes:
- ./website/server/build:/website/build
environment:
- REACT_APP_PROXY_SERVER=${REACT_APP_PROXY_SERVER:-http://api:8000}
- PORT=${REACT_APP_PORT}
- NODE_ENV=production
networks:
- frontend
command: npm start
restart: unless-stopped
api:
container_name: gradeview-api
# Own image name: the production image (docker-compose.yml, gradeview/server) has no
# dev dependencies.
image: ${CI_REGISTRY_IMAGE:-gradeview}/server-dev:${API_VERSION:-development}
build:
context: ./api
# The dev stage keeps the dev dependencies that `npm run dev` (nodemon) needs.
target: dev
volumes:
- ./api:/api
- /api/node_modules
environment:
- PORT=${API_PORT}
- NODE_ENV=production
- REDIS_DB_SECRET=${REDIS_DB_SECRET:?Set REDIS_DB_SECRET in the root .env file (cp .env.example .env)}
networks:
- frontend
- db
command: npm run dev
restart: unless-stopped
dtgui-progress-report:
container_name: dtgui-progress-report
image: ${CI_REGISTRY_IMAGE:-dtgui}/progress-report:${PROGRESS_REPORT_VERSION:-development}
build: ./progressReport
environment:
# nginx proxies /progress to dtgui-progress-report:8080, so keep this at 8080.
- LISTEN_PORT=${PROGRESS_REPORT_PORT:-8080}
networks:
- concept_map_integration
ports:
- 127.0.0.1:8080:${PROGRESS_REPORT_PORT:-8080}
restart: unless-stopped
redis:
image: redis:7.4.11-bookworm
networks:
- db
command: ["redis-server", "--requirepass", "${REDIS_DB_SECRET:?Set REDIS_DB_SECRET in the root .env file (cp .env.example .env)}"]
ports:
# localhost only: `make dev-local` runs the API on the host against localhost:6379
- 127.0.0.1:6379:6379
dbcron:
build: ./dbcron
volumes:
- ./dbcron:/dbcron
networks:
- db
depends_on:
- redis
networks:
frontend:
name: frontend
concept_map_integration:
name: concept_map_integration
db:
name: db