-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
docker-compose.yml
121 lines (106 loc) · 3.74 KB
/
docker-compose.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
# SPDX-FileCopyrightText: 2023 Marlon W (Mawoka)
#
# SPDX-License-Identifier: MPL-2.0
version: "3"
services:
frontend:
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
depends_on:
- redis
- api
environment:
REDIS_URL: redis://redis:6379/0?decode_responses=True
API_URL: http://api:80
api:
build: &build_cfg
context: .
dockerfile: Dockerfile
restart: &restart always
depends_on: &depends
- db
- redis
environment: &env_vars
# --- DON'T CHANGE FROM HERE ---
DB_URL: "postgresql://postgres:classquiz@db:5432/classquiz" # DON'T CHANGE
REDIS: "redis://redis:6379/0?decode_responses=True" # DON'T CHANGE
SECRET_KEY: "f2a08b44a104b4b4836fe4da9b25b795e1669f08bd1578397ecb19d176952780" # Don't change it manually, use the one-liner provided in the documentation
MAX_WORKERS: "1" # Very important and DON'T CHANGE
ACCESS_TOKEN_EXPIRE_MINUTES: 30 # DON'T CHANGE
MEILISEARCH_URL: "http://meilisearch:7700" # DON'T CHANGE
# -- DON'T CHANGE TILL HERE ---
# --- GENERAL CONFIG ---
ROOT_ADDRESS: "https://classquiz.de" # CHANGE IT (without a "/" at the end)
# --- MAIL CONFIG ---
MAIL_PORT: "587"
MAIL_ADDRESS: "email@[email protected]"
MAIL_PASSWORD: "PASSWORT"
MAIL_USERNAME: "email@[email protected]"
MAIL_SERVER: "smtp.email.email"
SKIP_EMAIL_VERIFICATION: "True" # Does the user have to confirm its email by clicking a link?
# --- EXTERNAL API CONFIG ---
# HCAPTCHA_KEY: ""
# PIXABAY_API_KEY: "" # Get it from here: https://pixabay.com/api/docs/
# RECAPTCHA_KEY: "" Get it from Google for the Captcha.
# -- STORAGE CONFIG ---
STORAGE_BACKEND: "local" # Could also be s3
STORAGE_PATH: "/app/data" # When s3 is used, this isn't needed.
# If STORAGE_BACKEND is "s3"
#S3_ACCESS_KEY: "YOUR_ACCESS_KEY"
#S3_SECRET_KEY: "YOUR_SECRET_KEY"
#S3_BASE_URL: "YOUR_S3_BASE_URL"
# --- GOOGLE_AUTH ---
#GOOGLE_CLIENT_ID: "" # Your Google-Client ID, or leave it unset if you don't want it.
#GOOGLE_CLIENT_SECRET: "" # Your Google-Client Secret, or leave it unset if you don't want it.
# --- GITHUB_AUTH ---
#GITHUB_CLIENT_ID: "" # Your GitHub-Client ID, or leave it unset if you don't want it.
#GITHUB_CLIENT_SECRET: "" # Your GitHub-Client Secret, or leave it unset if you don't want it.
# --- Custom OpenID ---
#CUSTOM_OPENID_PROVIDER__CLIENT_ID: "" # Adjust if needed
#CUSTOM_OPENID_PROVIDER__CLIENT_SECRET: "" # Adjust if needed
#CUSTOM_OPENID_PROVIDER__SERVER_METADATA_URL: "/.well-known/openid-configuration" # Adjust if needed
volumes: # Only needed if you chose the "local" storage-backend
- ./uploads:/var/storage
redis:
image: redis:alpine
restart: always
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
db:
image: postgres:14-alpine
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_PASSWORD: "classquiz"
POSTGRES_DB: "classquiz"
volumes:
- data:/var/lib/postgresql/data
proxy:
image: caddy:alpine
restart: always
volumes:
- ./Caddyfile-docker:/etc/caddy/Caddyfile
ports:
- "8000:8080" # The 8000 can be changed.
meilisearch:
image: getmeili/meilisearch:v0.28.0
restart: always
environment:
MEILI_NO_ANALYTICS: true
volumes:
- meilisearch-data:/data.ms
worker:
build: *build_cfg
environment: *env_vars
depends_on: *depends
restart: *restart
command: arq classquiz.worker.WorkerSettings
volumes:
data:
meilisearch-data: