72 lines
1.8 KiB
Django/Jinja
72 lines
1.8 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
version: '3.7'
|
|
services:
|
|
teddit-warp:
|
|
image: caomingjun/warp
|
|
container_name: teddit-warp
|
|
restart: always
|
|
environment:
|
|
- WARP_SLEEP=2
|
|
cap_add:
|
|
- NET_ADMIN
|
|
sysctls:
|
|
- net.ipv6.conf.all.disable_ipv6=0
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
|
volumes:
|
|
- {{ docker_dir }}/teddit:/var/lib/cloudflare-warp
|
|
ports:
|
|
- 8881:8080
|
|
- 6379:6379
|
|
networks:
|
|
- teddit
|
|
|
|
teddit:
|
|
container_name: teddit
|
|
image: teddit/teddit:latest
|
|
security_opt:
|
|
- no-new-privileges
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Asia/Singapore
|
|
- DOMAIN=i.opnxng.com
|
|
- USE_HELMET=true
|
|
- USE_HELMET_HSTS=true
|
|
- TRUST_PROXY=true
|
|
- REDIS_HOST=localhost
|
|
# - REDIS_HOST=teddit-redis
|
|
- THEME=dark
|
|
- FLAIRS_ENABLED=false
|
|
- API_ENABLED=false
|
|
- SUGGESTED_SUBREDDITS=["Saved", "Selfhosted", "Linux", "Privacy", "DataHoarder"]
|
|
- DOMAIN_REPLACEMENTS=[["quora.com","q.opnxng.com."],["imgur.com","r.opnxng.com"]]
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"]
|
|
interval: 1m
|
|
timeout: 3s
|
|
depends_on:
|
|
- teddit-redis
|
|
logging:
|
|
driver: none
|
|
volumes:
|
|
- {{ docker_dir }}/teddit/topbar.pug:/teddit/views/includes/topbar.pug
|
|
- {{ docker_dir }}/teddit/about.pug:/teddit/views/about.pug
|
|
network_mode: "service:teddit-warp"
|
|
|
|
teddit-redis:
|
|
container_name: teddit-redis
|
|
image: redis:alpine
|
|
command: redis-server
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Asia/Singapore
|
|
- REDIS_REPLICATION_MODE=master
|
|
restart: unless-stopped
|
|
network_mode: "service:teddit-warp"
|
|
|
|
networks:
|
|
teddit:
|
|
name: teddit
|