2024-08-06 16:12:54 -03:00
|
|
|
#
|
|
|
|
# Please consult the `Deployment` section in the readme if you want to deploy
|
|
|
|
# this. You *need* to keep this nginx service, even if you have your own,
|
|
|
|
# otherwise the static files will not be served correctly! If you do remove
|
|
|
|
# it, configure yours similarly to what's in config/nginx.conf
|
|
|
|
# Also take a look at the "Static files" section in the .env file
|
|
|
|
|
|
|
|
services:
|
|
|
|
web:
|
|
|
|
image: wger/server:latest
|
|
|
|
container_name: wger_web
|
2024-08-06 17:42:31 -03:00
|
|
|
environment:
|
|
|
|
- DJANGO_DB_ENGINE=django.db.backends.sqlite3
|
2024-08-06 17:51:04 -03:00
|
|
|
- DJANGO_DB_DATABASE=/home/wger/src/db/database.sqlite # Within the container, so be careful
|
2024-08-06 17:42:31 -03:00
|
|
|
- TZ=America/Moncton
|
|
|
|
- CSRF_TRUSTED_ORIGINS=https://wger.shoebottom.ca
|
|
|
|
- X_FORWARDED_PROTO_HEADER_SET=True
|
|
|
|
- MEDIA_URL=https://wger.shoebottom.ca/media/
|
|
|
|
- STATIC_URL=https://wger.shoebottom.ca/static/
|
|
|
|
- WGER_INSTANCE=https://wger.de # Wger instance from which to sync exercises, images, etc.
|
|
|
|
- ALLOW_REGISTRATION=True
|
|
|
|
- ALLOW_GUEST_USERS=True
|
|
|
|
- ALLOW_UPLOAD_VIDEOS=False
|
|
|
|
- MIN_ACCOUNT_AGE_TO_TRUST=21
|
|
|
|
- DOWNLOAD_INGREDIENTS_FROM=WGER
|
|
|
|
- USE_CELERY=False
|
|
|
|
- AXES_ENABLED=True
|
|
|
|
- AXES_FAILURE_LIMIT=10
|
|
|
|
- AXES_COOLOFF_TIME=30 # in minutes
|
|
|
|
- AXES_HANDLER=axes.handlers.cache.AxesCacheHandler
|
|
|
|
- AXES_LOCKOUT_PARAMETERS=ip_address
|
|
|
|
- AXES_IPWARE_PROXY_COUNT=1
|
|
|
|
- AXES_IPWARE_META_PRECEDENCE_ORDER=HTTP_X_FORWARDED_FOR,REMOTE_ADDR
|
|
|
|
- DJANGO_DEBUG=False
|
|
|
|
- WGER_USE_GUNICORN=True
|
|
|
|
- EXERCISE_CACHE_TTL=18000 # in seconds - 5*60*60, 5 hours
|
|
|
|
- SITE_URL=https://wger.shoebottom.ca
|
|
|
|
- ACCESS_TOKEN_LIFETIME=10 # The lifetime duration of the access token, in minutes
|
|
|
|
- REFRESH_TOKEN_LIFETIME=24 # The lifetime duration of the refresh token, in hours
|
|
|
|
- USE_RECAPTCHA=False
|
|
|
|
- DJANGO_CLEAR_STATIC_FIRST=True
|
|
|
|
- FROM_EMAIL='wger Workout Manager <wger@shoebottom.com>'
|
|
|
|
|
2024-08-06 16:12:54 -03:00
|
|
|
env_file:
|
|
|
|
- ../stack.env
|
|
|
|
volumes:
|
2024-08-06 17:51:04 -03:00
|
|
|
- /docker/appdata/wger/db:/home/wger/src/db
|
2024-08-06 17:42:31 -03:00
|
|
|
- /docker/appdata/wger/static:/home/wger/static
|
|
|
|
- /docker/appdata/wger/media:/home/wger/media
|
2024-08-06 17:03:27 -03:00
|
|
|
expose:
|
|
|
|
- 8000
|
2024-08-06 16:12:54 -03:00
|
|
|
healthcheck:
|
|
|
|
test: wget --no-verbose --tries=1 --spider http://localhost:8000
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
start_period: 300s
|
|
|
|
retries: 5
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-08-06 17:03:27 -03:00
|
|
|
nginx:
|
|
|
|
image: nginx:stable
|
2024-08-06 17:05:39 -03:00
|
|
|
container_name: wger_nginx
|
2024-08-06 17:03:27 -03:00
|
|
|
depends_on:
|
|
|
|
- web
|
2024-08-06 16:50:49 -03:00
|
|
|
volumes:
|
2024-08-06 17:03:27 -03:00
|
|
|
- /docker/appdata/wger/nginx.conf:/etc/nginx/conf.d/default.conf
|
2024-08-06 17:42:31 -03:00
|
|
|
- /docker/appdata/wger/static:/wger/static:ro
|
|
|
|
- /docker/appdata/wger/media:/wger/media:ro
|
2024-08-06 17:03:27 -03:00
|
|
|
ports:
|
|
|
|
- "9002:80"
|
|
|
|
healthcheck:
|
|
|
|
test: service nginx status
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
restart: unless-stopped
|