# # 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 environment: - DJANGO_DB_ENGINE=django.db.backends.postgresql # Within the container, so be careful - 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 - 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 ' env_file: - ../stack.env volumes: - /docker/appdata/wger/db/database.sqlite:/home/wger/db/database.sqlite - /docker/appdata/wger/static:/home/wger/static - /docker/appdata/wger/media:/home/wger/media expose: - 8000 healthcheck: test: wget --no-verbose --tries=1 --spider http://localhost:8000 interval: 10s timeout: 5s start_period: 300s retries: 5 restart: unless-stopped db: image: postgres:15-alpine 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 nginx: image: nginx:stable container_name: wger_nginx depends_on: - web volumes: - /docker/appdata/wger/nginx.conf:/etc/nginx/conf.d/default.conf - /docker/appdata/wger/static:/wger/static:ro - /docker/appdata/wger/media:/wger/media:ro ports: - "9002:80" healthcheck: test: service nginx status interval: 10s timeout: 5s retries: 5 start_period: 30s restart: unless-stopped