Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
services:wger [2024/06/19 07:48] – willy | services:wger [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== WGer ====== | ||
- | |||
- | [[https:// | ||
- | |||
- | **Note:** I am not using this at this time, so this information might be out of date. | ||
- | |||
- | ===== Installation ===== | ||
- | |||
- | WGer provides instruction for a bare-metal installation, | ||
- | |||
- | Some good refrence for WGer and docker can be found [[https:// | ||
- | |||
- | As usual, let's create the dedicated user **wger** first: | ||
- | <code bash> | ||
- | useradd -d / | ||
- | mkdir /data/wger | ||
- | mkdir / | ||
- | chown -R wger /data/wger | ||
- | </ | ||
- | |||
- | <file - docker-compose.yml> | ||
- | services: | ||
- | web: | ||
- | image: wger/ | ||
- | container_name: | ||
- | env_file: | ||
- | - ./ | ||
- | volumes: | ||
- | - / | ||
- | - / | ||
- | ports: | ||
- | - 8123:8000 | ||
- | networks: | ||
- | - wger-net | ||
- | |||
- | networks: | ||
- | wger-net: {} | ||
- | </ | ||
- | |||
- | Also, you need the following **prod.env** file: | ||
- | <file - prod.env> | ||
- | SECRET_KEY=wger-docker-supersecret-key-< | ||
- | SIGNING_KEY=wger-docker-secret-jwtkey-< | ||
- | TIME_ZONE=Europe/ | ||
- | CSRF_TRUSTED_ORIGINS=https:// | ||
- | X_FORWARDED_PROTO_HEADER_SET=True | ||
- | WGER_INSTANCE=https:// | ||
- | ALLOW_REGISTRATION=True | ||
- | ALLOW_GUEST_USERS=True | ||
- | ALLOW_UPLOAD_VIDEOS=True | ||
- | MIN_ACCOUNT_AGE_TO_TRUST=21 | ||
- | DJANGO_DB_ENGINE=django.db.backends.sqlite3 | ||
- | DJANGO_DB_DATABASE=/ | ||
- | DJANGO_DB_USER=wger | ||
- | DJANGO_DB_PASSWORD=wger | ||
- | DJANGO_DB_HOST=localhost | ||
- | DJANGO_DB_PORT=5432 | ||
- | DJANGO_PERFORM_MIGRATIONS=True | ||
- | DJANGO_DEBUG=False | ||
- | WGER_USE_GUNICORN=True | ||
- | EXERCISE_CACHE_TTL=18000 | ||
- | SITE_URL=http:// | ||
- | ACCESS_TOKEN_LIFETIME=10 | ||
- | REFRESH_TOKEN_LIFETIME=24 | ||
- | USE_RECAPTCHA=False | ||
- | DJANGO_CLEAR_STATIC_FIRST=False | ||
- | FROM_EMAIL=' | ||
- | </ | ||
- | |||
- | ===== Reverse Proxy ===== | ||
- | |||
- | I didn't try to urn WGer on a subpath. | ||
- | The following NGINX config file should be enough: | ||
- | <file - wger.conf> | ||
- | server { | ||
- | server_name train.mydomain.com; | ||
- | listen 443 ssl; | ||
- | listen 8443 ssl; | ||
- | |||
- | access_log / | ||
- | error_log / | ||
- | |||
- | location / { | ||
- | proxy_pass http:// | ||
- | proxy_set_header Host $host; | ||
- | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
- | proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; | ||
- | proxy_set_header X-Forwarded-Host $host: | ||
- | proxy_redirect off; | ||
- | } | ||
- | |||
- | location /static/ { | ||
- | alias / | ||
- | } | ||
- | |||
- | location /media/ { | ||
- | alias / | ||
- | } | ||
- | |||
- | client_max_body_size 100M; | ||
- | include com.mydomain/ | ||
- | } | ||
- | </ | ||
- | |||
- | See [[selfhost: | ||
- | |||