services: wger-ts: image: tailscale/tailscale:latest hostname: wger container_name: wger-ts environment: - TS_AUTHKEY={{YOUR_TAILSCALE_AUTHKEY}} - TS_STATE_DIR=/var/lib/tailscale - TS_SERVE_CONFIG=/config/serve.json volumes: - ./tailscale/tailscale-data:/var/lib/tailscale - ./tailscale/config:/config - /dev/net/tun:/dev/net/tun cap_add: - net_admin - sys_module restart: unless-stopped web: image: wger/server:latest depends_on: db: condition: service_healthy cache: condition: service_healthy env_file: - ./config/prod.env volumes: - static:/home/wger/static - 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 nginx: network_mode: service:wger-ts depends_on: - wger-ts - web image: nginx:stable volumes: - ./config/nginx.conf:/etc/nginx/conf.d/default.conf - static:/wger/static:ro - media:/wger/media:ro # ports: # - "80:80" healthcheck: test: service nginx status interval: 10s timeout: 5s retries: 5 start_period: 30s restart: unless-stopped db: image: postgres:15-alpine environment: - POSTGRES_USER=wger - POSTGRES_PASSWORD=wger - POSTGRES_DB=wger - TZ=Europe/Berlin volumes: - postgres-data:/var/lib/postgresql/data/ expose: - 5432 healthcheck: test: pg_isready -U wger interval: 10s timeout: 5s retries: 5 start_period: 30s restart: unless-stopped cache: image: redis expose: - 6379 volumes: - ./config/redis.conf:/usr/local/etc/redis/redis.conf - redis-data:/data command: [ "redis-server", "/usr/local/etc/redis/redis.conf"] healthcheck: test: redis-cli ping interval: 10s timeout: 5s retries: 5 start_period: 30s restart: unless-stopped # You probably want to limit the memory usage of the cache, otherwise it might # hog all the available memory. Remove or change according to your needs. #mem_limit: 5gb celery_worker: image: wger/server:latest command: /start-worker env_file: - ./config/prod.env volumes: - media:/home/wger/media depends_on: web: condition: service_healthy healthcheck: test: celery -A wger inspect ping interval: 10s timeout: 5s retries: 5 start_period: 30s celery_beat: image: wger/server:latest command: /start-beat volumes: - celery-beat:/home/wger/beat/ env_file: - ./config/prod.env depends_on: celery_worker: condition: service_healthy volumes: postgres-data: celery-beat: redis-data: # Heads up, if you remove these volumes and use folders directly you need to chown them # to the UID and GID 1000 even if it doesn't exist on your system. Also, they should # be readable by everyone. # # https://wger.readthedocs.io/en/latest/production/docker.html#missing-static-files media: static: networks: default: name: wger_network