version: '3.4' services: app: image: "{{ stack_image }}:{{ shaarli_version }}" healthcheck: test: ["CMD", "wget", "--quiet", "--spider", "--tries=1", "http://127.0.0.1:80"] interval: 1m timeout: 10s retries: 3 start_period: 1m networks: - "{{ docker_swarm_public_network_name }}" volumes: - data:/var/www/shaarli/data - cache:/var/www/shaarli/cache {% if shaarli_autoupdate is defined and shaarli_autoupdate %} deploy: labels: - shepherd.autoupdate=true {% endif %} {% if backup_enable is not undefined and not false and shaarli_backup_enable is not undefined and not false %} backup: image: mazzolino/restic environment: - "TZ={{ restic_timezone }}" # go-cron starts w seconds - "BACKUP_CRON={{ shaarli_backup_cron }}" - "RESTIC_REPOSITORY={{ restic_repo }}" - "AWS_ACCESS_KEY_ID={{ restic_s3_key }}" - "AWS_SECRET_ACCESS_KEY={{ restic_s3_secret }}" - "RESTIC_PASSWORD={{ restic_pass }}" - "RESTIC_BACKUP_TAGS=shaarli" - "RESTIC_BACKUP_SOURCES=/volumes" volumes: - data:/volumes/shaarli_data:ro {% endif %} volumes: data: cache: networks: "{{ docker_swarm_public_network_name }}": external: true