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:
|
2024-08-06 18:01:32 -03:00
|
|
|
- DJANGO_DB_ENGINE=django.db.backends.postgresql
|
2024-08-06 17:53:34 -03:00
|
|
|
- DJANGO_DB_DATABASE=wger
|
|
|
|
- DJANGO_DB_USER=wger
|
|
|
|
- DJANGO_DB_PASSWORD=wger
|
|
|
|
- DJANGO_DB_HOST=db
|
|
|
|
- DJANGO_DB_PORT=5432
|
|
|
|
- DJANGO_PERFORM_MIGRATIONS=True # Perform any new database migrations on startup
|
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.
|
2024-08-06 19:18:16 -03:00
|
|
|
- ALLOW_REGISTRATION=False
|
|
|
|
- ALLOW_GUEST_USERS=False
|
2024-08-06 17:42:31 -03:00
|
|
|
- ALLOW_UPLOAD_VIDEOS=False
|
|
|
|
- MIN_ACCOUNT_AGE_TO_TRUST=21
|
|
|
|
- DOWNLOAD_INGREDIENTS_FROM=WGER
|
|
|
|
- USE_CELERY=False
|
2024-08-06 18:06:36 -03:00
|
|
|
- AXES_ENABLED=False
|
2024-08-06 17:42:31 -03:00
|
|
|
- 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
|
2024-08-06 18:15:23 -03:00
|
|
|
- DJANGO_CLEAR_STATIC_FIRST=False
|
2024-08-06 17:42:31 -03:00
|
|
|
- FROM_EMAIL='wger Workout Manager <wger@shoebottom.com>'
|
2024-08-06 18:57:49 -03:00
|
|
|
- DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
|
|
|
|
- DJANGO_CACHE_LOCATION=redis://cache:6379/1
|
|
|
|
- DJANGO_CACHE_TIMEOUT=1296000 # in seconds - 60*60*24*15, 15 Days
|
|
|
|
- DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
|
2024-08-06 18:02:38 -03:00
|
|
|
depends_on:
|
2024-08-06 18:57:49 -03:00
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
cache:
|
|
|
|
condition: service_healthy
|
2024-08-06 16:12:54 -03:00
|
|
|
env_file:
|
|
|
|
- ../stack.env
|
|
|
|
volumes:
|
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 18:01:17 -03:00
|
|
|
db:
|
|
|
|
image: postgres:15-alpine
|
2024-08-06 18:02:38 -03:00
|
|
|
container_name: wger_db
|
2024-08-06 18:01:17 -03:00
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=wger
|
|
|
|
- POSTGRES_PASSWORD=wger
|
|
|
|
- POSTGRES_DB=wger
|
|
|
|
volumes:
|
|
|
|
- /docker/appdata/wger/db:/var/lib/postgresql/data/
|
|
|
|
expose:
|
|
|
|
- 5432
|
|
|
|
healthcheck:
|
|
|
|
test: pg_isready -U wger
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
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
|
2024-08-06 18:57:49 -03:00
|
|
|
|
|
|
|
cache:
|
|
|
|
image: redis
|
2024-08-06 19:05:54 -03:00
|
|
|
container_name: wger_cache
|
2024-08-06 18:57:49 -03:00
|
|
|
expose:
|
|
|
|
- 6379
|
|
|
|
volumes:
|
|
|
|
- /docker/appdata/wger/cache:/data
|
|
|
|
healthcheck:
|
|
|
|
test: redis-cli ping
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
restart: unless-stopped
|