0
0
opnxng-deploy-playbook/templates/compose/send.yaml.j2

59 lines
1.5 KiB
Django/Jinja

# {{ ansible_managed }}
version: "3.8"
services:
send:
# image: "registry.gitlab.com/timvisee/send:latest"
image: ghcr.io/xavion-lux/send:latest
container_name: send
restart: always
volumes:
- {{ docker_dir }}/send/uploads:/uploads
security_opt:
- no-new-privileges
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
- NODE_ENV=development
- BASE_URL=https://s.opnxng.com
- PORT=1443
- REDIS_HOST=send-redis
- FILE_DIR=/uploads
- DOWNLOAD_COUNTS=1,2,5,10,15,25 #,50,100,1000
- DEFAULT_DOWNLOADS=10
- MAX_DOWNLOADS=25
- EXPIRE_TIMES_SECONDS=3600,86400,604800 #2592000
- DEFAULT_EXPIRE_SECONDS=604800
- MAX_EXPIRE_SECONDS=604800
ports:
- 8886:1443
networks:
- send
labels:
- "com.centurylinklabs.watchtower.enable=false"
send-redis:
image: 'redis:alpine'
container_name: send-redis
restart: always
security_opt:
- no-new-privileges
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
volumes:
- {{ docker_dir }}/send/send-redis:/data
command: "redis-server --appendonly yes"
labels:
- "com.centurylinklabs.watchtower.enable=false"
networks:
- send
networks:
send:
name: send
# Clear expired uploads
# 0 */3 * * * find {{ docker_dir }}/send/uploads/ -name 7-\* -mmin +10130 -exec rm {} \;
# 0 */3 * * * find {{ docker_dir }}/send/uploads/ -name 1-\* -mmin +1500 -exec rm {} \;