-
Notifications
You must be signed in to change notification settings - Fork 3
/
compose.yaml
65 lines (56 loc) · 1.76 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
# SPDX-License-Identifier: FSFAP
# Copyright (C) 2023-2024 Edith Coates
# Copyright (C) 2023-2024 Colin B. Macdonald
services:
nginx:
build: ./nginx
ports:
- 8443:443
# or for non-SSL, and also change below
# - 8080:80
depends_on:
- web
web:
# 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
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"
# 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"
# 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
postgres:
image: postgres:13
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: