forked from zekroTJA/shinpuru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
151 lines (143 loc) · 5.04 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: '3'
services:
traefik:
image: 'traefik:latest'
command:
- '--providers.docker'
- '--providers.file.directory=/etc/traefik/dynamic_conf'
- '--entrypoints.http.address=:80'
- '--entrypoints.https.address=:443'
- '--providers.docker.exposedByDefault=false'
- "--certificatesResolvers.le.acme.email=<your@email>" # ⚠️ <- enter your email here
- "--certificatesResolvers.le.acme.httpChallenge.entryPoint=http"
ports:
- '80:80'
- '443:443'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- './traefik/config:/etc/traefik/dynamic_conf'
restart: always
minio:
image: 'minio/minio:latest'
expose:
- '9000'
volumes:
- './minio/data:/data'
environment:
MINIO_ACCESS_KEY: 'minio_access_key'
MINIO_SECRET_KEY: 'minio_secret_key'
MINIO_REGION_NAME: 'us-east-1'
command: server /data # --certs-dir /etc/cert
restart: always
redis:
image: 'redis:latest'
expose:
- '6379'
restart: always
mysql:
image: 'mariadb:latest'
expose:
- '3306'
environment:
MYSQL_ROOT_PASSWORD: mysql_root_password
MYSQL_DATABASE: shinpuru
volumes:
- './mysql/cfg:/etc/mysql'
- './mysql/lib:/var/lib/mysql'
restart: always
shinpuru:
image: 'ghcr.io/zekrotja/shinpuru:latest'
volumes:
- './shinpuru/config:/etc/config'
- '/etc/cert:/etc/cert'
expose:
- '8080'
environment:
SP_VERSION: 6
# Discord Config
SP_DISCORD_TOKEN: <discord_token>
SP_DISCORD_GENERALPREFIX: sp!
SP_DISCORD_OWNERID: <your_user_id>
SP_DISCORD_CLIENTID: <application_id>
SP_DISCORD_CLIENTSECRET: <client_secret>
SP_DISCORD_GUILDSLIMIT: 0
SP_DISCORD_GLOBALCOMMANDRATELIMIT_ENABLED: 1
SP_DISCORD_GLOBALCOMMANDRATELIMIT_BURST: 3
SP_DISCORD_GLOBALCOMMANDRATELIMIT_LIMITSECONDS: 20
# Database
SP_DATABASE_TYPE: mysql
SP_DATABASE_MYSQL_HOST: mysql
SP_DATABASE_MYSQL_USER: root
SP_DATABASE_MYSQL_PASSWORD: mysql_root_password
SP_DATABASE_MYSQL_DATABASE: shinpuru
# Cache
SP_CACHE_REDIS_ADDR: redis:6379
SP_CACHE_REDIS_TYPE: 0
SP_CACHE_CACHEDATABASE: 1
# Logging
SP_LOGGING_COMMANDLOGGING: 1
SP_LOGGING_LOGLEVEL: 4
# Storage
SP_STORAGE_TYPE: minio
SP_STORAGE_MINIO_ENDPOINT: minio:9000
SP_STORAGE_MINIO_ACCESSKEY: minio_access_key
SP_STORAGE_MINIO_ACCESSSECRET: minio_secret_key
SP_STORAGE_MINIO_LOCATION: us-east-1
SP_STORAGE_MINIO_SECURE: 0
# Webserver
SP_WEBSERVER_ENABLED: 1
SP_WEBSERVER_ADDR: 0.0.0.0:8080
SP_WEBSERVER_APITOKENKEY: <Random string which sould have at least 64 characters>
SP_WEBSERVER_PUBLICADDR: <https://example.com>
SP_WEBSERVER_RATELIMIT_ENABLED: 1
SP_WEBSERVER_RATELIMIT_BURST: 50
SP_WEBSERVER_RATELIMIT_LIMITSECONDS: 3
SP_WEBSERVER_ACCESSTOKEN_LIFETIMESECONDS: 600
SP_WEBSERVER_CAPTCHA_SITEKEY: <hCaptcha Sitekey>
SP_WEBSERVER_CAPTCHA_SECRETKEY: <hCaptcha Secretkey>
# Codeexec
SP_CODEEXEC_TYPE: "ranna"
SP_CODEEXEC_RANNA_APIVERSION: "v1"
SP_CODEEXEC_RANNA_ENDPOINT: "https://public.ranna.dev"
SP_CODEEXEC_RATELIMIT_ENABLED: 1
SP_CODEEXEC_RATELIMIT_BURST: 5
SP_CODEEXEC_RATELIMIT_LIMITSECONDS: 60
# Privacy
# ⚠️ YOU MUST CHANGE THIS WHEN YOU HOST YOUR SHINPURU INSTANCE PUBLICLY!
SP_PRIVACY_NOTICEURL: "https://github.com/zekroTJA/shinpuru/blob/master/PRIVACY.md"
SP_PRIVACY_CONTACT_0_TITLE: "E-Mail"
SP_PRIVACY_CONTACT_0_VALUE: "<your@mail.address>"
SP_PRIVACY_CONTACT_0_URL: "mailto:<your@mail.address>"
restart: always
depends_on:
- mysql
- redis
- minio
labels:
traefik.enable: "true"
traefik.http.routers.shinpuru.entrypoints: "https"
traefik.http.routers.shinpuru.tls: "true"
traefik.http.routers.shinpuru.tls.certresolver: "le"
traefik.http.routers.shinpuru.rule: "Host(`<example.com>`)" # ⚠️ <- enter your domain here
###############################################################################
# The following two services are only important if
# you want to monitor metrics of your shinpuru
# instance using prometheus and grafana.
# prometheus:
# image: 'prom/prometheus:latest'
# expose:
# - '9090'
# volumes:
# # Change this if you want to use another prometheus config.
# - './config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
# restart: always
# grafana:
# image: 'grafana/grafana'
# expose:
# - '3000'
# labels:
# traefik.enable: "true"
# traefik.http.routers.grafana.entrypoints: "https"
# traefik.http.routers.grafana.tls: "true"
# traefik.http.routers.grafana.tls.certresolver: "le"
# traefik.http.routers.grafana.rule: "Host(`grafana.<example.com>`)"