Yan / opebgym

Last active 14 hours ago

Like 0

https://github.com/DuarteSantos8/openGym

Yan revised this gist 14 hours ago · 1ee1a40

1 file changed, 72 insertions

opengym (file created)
@@ -0,0 +1,72 @@
1 + services:
2 + api:
3 + image: registry.gitlab.com/duartesantos8/opengym/api:latest
4 + container_name: opengym-api
5 + hostname: opengym-api
6 + user: "1021:100"
7 + read_only: true
8 + security_opt:
9 + - no-new-privileges:true
10 + tmpfs:
11 + - /tmp:rw,noexec,nosuid,size=64m
12 + environment:
13 + DATA_DIR: /data
14 + PORT: ${PORT:-3000}
15 + RP_ID: ${RP_ID:-localhost}
16 + ORIGIN: ${ORIGIN:-http://localhost:8080}
17 + RP_NAME: ${RP_NAME:-openGym}
18 + SESSION_DAYS: ${SESSION_DAYS:-90}
19 + ADMIN_UIDS: ${ADMIN_UIDS:-}
20 + INVITE_ONLY: ${INVITE_ONLY:-}
21 + ALLOW_GUEST: ${ALLOW_GUEST:-1}
22 + AUDIT_LOG: ${AUDIT_LOG:-1}
23 + AUDIT_IP: ${AUDIT_IP:-off}
24 + VAPID_SUBJECT: ${VAPID_SUBJECT:-}
25 + COACH_DISABLED: ${COACH_DISABLED:-1}
26 + volumes:
27 + - ./data:/data:rw
28 + networks:
29 + - opengym-net
30 + healthcheck:
31 + test: ["CMD-SHELL", "node -e \"require('http').get('http://127.0.0.1:${PORT:-3000}/', r => process.exit(r.statusCode < 500 ? 0 : 1)).on('error', () => process.exit(1))\""]
32 + interval: 30s
33 + timeout: 5s
34 + retries: 3
35 + start_period: 20s
36 + restart: unless-stopped
37 +
38 + web:
39 + image: registry.gitlab.com/duartesantos8/opengym/web:1.3.7
40 + container_name: opengym-web
41 + hostname: opengym-web
42 + user: "1021:100"
43 + read_only: true
44 + security_opt:
45 + - no-new-privileges:true
46 + tmpfs:
47 + - /tmp:rw,noexec,nosuid,size=32m
48 + - /var/cache/nginx:rw,noexec,nosuid,size=64m
49 + - /var/run:rw,noexec,nosuid,size=1m
50 + - /etc/nginx/conf.d:rw,noexec,nosuid,size=1m
51 + environment:
52 + BACKEND: api
53 + PORT: ${PORT:-3000}
54 + NGINX_PORT: ${NGINX_PORT:-8080} # >1024, damit keine Capability noetig ist
55 + ports:
56 + - "${WEB_PORT:-8080}:${NGINX_PORT:-8080}"
57 + depends_on:
58 + api:
59 + condition: service_healthy
60 + networks:
61 + - opengym-net
62 + healthcheck:
63 + test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:${NGINX_PORT:-8080}/ || exit 1"]
64 + interval: 30s
65 + timeout: 5s
66 + retries: 3
67 + start_period: 10s
68 + restart: unless-stopped
69 +
70 + networks:
71 + opengym-net:
72 + driver: bridge