-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcompose.yaml
78 lines (69 loc) · 2.34 KB
/
compose.yaml
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
# SPDX-License-Identifier: FSFAP
# Copyright (C) 2023-2024 Edith Coates
# Copyright (C) 2023-2024 Colin B. Macdonald
services:
nginx:
image: nginx:1.27
ports:
- 8443:443
# or for non-SSL, and also change below
# - 8080:80
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/plom-selfsigned.crt:/etc/ssl/private/plom.crt
- ./nginx/plom-selfsigned.key:/etc/ssl/private/plom.key
depends_on:
- plom
plom:
# Use the released version: TODO: should be set on release? Issue #3208
image: plomgrading/server
# image: registry.gitlab.com/plom/plom:main
# Use in-tree code by replacing image: with build:
# build:
# context: .
# dockerfile: Containerfile.bulk
# Optionally, expose django server directly, e.g., for dev work
# ports:
# - 8000:8000
# expose:
# - 8000
# this feels less than ideal; WIP
command: bash -c "cd /src/plom_server; ./docker_run.sh"
# command: plom-new-server
volumes:
- plom_media:/exam/
# - ./my_exam:/exam:z # mount local dir
depends_on:
- postgres
environment:
- PLOM_MEDIA_ROOT=/exam/media_root
- PLOM_DATABASE_HOSTNAME=postgres
# - PLOM_DATABASE_NAME=plom_db
# If you want a hostname other than "localhost"
# - PLOM_HOSTNAME=x1c10.lan
# must match nginx's config above, not needed if running on 80/443?
- PLOM_PUBLIC_FACING_PORT=8443
- PLOM_PUBLIC_FACING_SCHEME=https
# - PLOM_PUBLIC_FACING_PREFIX=
# If PLOM_DEMO is 1, the container will start the demo automatically
# - PLOM_DEMO=1
# For production, set PLOM_DEBUG to 0; and must define a random secret
# - PLOM_DEBUG=0
# - PLOM_SECRET_KEY=bismarkomitleafagebuckbank
# Performance tweaks: default values generally found in settings.py
# - PLOM_GUNICORN_TIMEOUT=180
# - WEB_CONCURRENCY=4 # how many gunicorn processes
# - PLOM_HUEY_WORKERS=4
# - PLOM_HUEY_PARENT_WORKERS=2
postgres:
image: postgres:16
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
# Use `docker volume ls` and `docker inspect <name>` to find where it is on the host
volumes:
postgres_data:
plom_media: