-
Notifications
You must be signed in to change notification settings - Fork 75
/
docker-compose.local.yml
124 lines (118 loc) · 5.41 KB
/
docker-compose.local.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
version: "3.8"
services:
django:
build:
context: .
dockerfile: ./infrastructure/local/django/Dockerfile
image: cs_field_guide_local_django
volumes:
- ./csfieldguide/:/app/:z
- ./infrastructure/local/node/Dockerfile:/test_files/Dockerfile:z
- ./docker-compose.local.yml:/test_files/docker-compose.local.yml:z
env_file:
- ./infrastructure/local/django/.envs
- ./infrastructure/local/postgres/.envs
command: /start
networks:
- uccser-development-stack
- backend
labels:
# General labels
- "traefik.enable=true"
- "traefik.docker.network=uccser-development-stack"
- "traefik.http.services.cs-field-guide-django.loadbalancer.server.port=8000"
# HTTPS
- "traefik.http.routers.cs-field-guide-django.entryPoints=web-secure"
- "traefik.http.routers.cs-field-guide-django.service=cs-field-guide-django"
- "traefik.http.routers.cs-field-guide-django.rule=Host(`cs-field-guide.localhost`)"
- "traefik.http.routers.cs-field-guide-django.tls=true"
# Node server for creating static files
node:
build:
context: .
dockerfile: ./infrastructure/local/node/Dockerfile
args:
DOCKER_UID: ${DOCKER_UID}
image: cs_field_guide_local_node
volumes:
# https://burnedikt.com/dockerized-node-development-and-mounting-node-volumes/#exclude-node_modules-from-the-mount
- ./csfieldguide/package.json:/app/package.json:z
- ./csfieldguide/package-lock.json:/app/package-lock.json:z
- ./csfieldguide/gulpfile.mjs:/app/gulpfile.mjs:z
- ./csfieldguide/static:/app/static:z
- ./csfieldguide/build:/app/build:z
- /app/static/interactives/algorithm-timer/node_modules/
- /app/static/interactives/big-number-calculator/node_modules/
- /app/static/interactives/bin-packing/node_modules/
- /app/static/js/translation-rotation-interactives/node_modules/
- /app/static/interactives/caesar-cipher/node_modules/
- /app/static/interactives/city-trip/node_modules/
- /app/static/interactives/cmy-mixer/node_modules/
- /app/static/interactives/colour-matcher/node_modules/
- /app/static/interactives/data-bias/node_modules/
- /app/static/interactives/data-visualisation/node_modules/
- /app/static/interactives/frequency-analysis/node_modules/
- /app/static/interactives/jpeg-compression/node_modules/
- /app/static/interactives/matrix-simplifier/node_modules/
- /app/static/interactives/packet-attack/node_modules/
- /app/static/interactives/password-guesser/node_modules/
- /app/static/interactives/product-code-check-digit-calculation/node_modules/
- /app/static/interactives/python-interpreter/node_modules/
- /app/static/interactives/qr-code-generator/node_modules/
- /app/static/interactives/rgb-mixer/node_modules/
- /app/static/interactives/rsa-decryption/node_modules/
- /app/static/interactives/rsa-encryption/node_modules/
- /app/static/interactives/rsa-key-generator/node_modules/
- /app/static/interactives/scene-editor/node_modules/
- /app/static/interactives/sha2/node_modules/
- /app/static/interactives/shannon-experiment/node_modules/
- /app/static/interactives/sorting-algorithms/node_modules/
- /app/static/interactives/training-ground/node_modules/
- /app/static/interactives/unicode-binary/node_modules/
- /app/static/interactives/unicode-chars/node_modules/
- /app/static/interactives/viola-jones-face-detector/node_modules/
command: npm run dev
networks:
- backend
puppeteer:
image: buildkite/puppeteer:10.0.0
volumes:
- ./csfieldguide/make-interactive-thumbnails.js:/make-interactive-thumbnails.js:z
- ./csfieldguide/staticfiles:/staticfiles:z
- ./csfieldguide/build:/build:z
profiles:
- static-files
networks:
- backend
postgres:
image: postgres:13.8
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
env_file:
- ./infrastructure/local/postgres/.envs
networks:
- backend
docs:
image: ghcr.io/uccser/local-docs-image:latest
volumes:
- ./docs:/docs:z
networks:
- uccser-development-stack
labels:
# General labels
- "traefik.enable=true"
- "traefik.http.services.cs-field-guide-docs.loadbalancer.server.port=7000"
# HTTPS
- "traefik.http.routers.cs-field-guide-docs.entryPoints=web-secure"
- "traefik.http.routers.cs-field-guide-docs.service=cs-field-guide-docs"
- "traefik.http.routers.cs-field-guide-docs.rule=Host(`docs.cs-field-guide.localhost`)"
- "traefik.http.routers.cs-field-guide-docs.tls=true"
networks:
backend:
driver: bridge
uccser-development-stack:
external: true