shelfy-v2/docker-compose.yml

51 lines
1.4 KiB
YAML
Raw Normal View History

2025-07-27 14:26:30 +00:00
version: "3.9"
services:
2025-07-27 15:07:57 +00:00
shelfy:
build:
context: .
dockerfile: Dockerfile
2025-07-27 14:26:30 +00:00
container_name: shelfy-go
working_dir: /app
ports:
2025-08-18 16:20:06 +00:00
- "8090:8080"
2025-08-18 16:35:07 +00:00
- "2121:2121"
- "30000-30100:30000-30100"
- "2222:2222"
2025-07-27 15:07:57 +00:00
extra_hosts:
2025-08-18 16:30:07 +00:00
- "dockerhost:host-gateway"
2025-08-18 16:35:07 +00:00
environment:
- SHELFY_DATA_DIR=/app/data
2025-07-27 15:07:57 +00:00
volumes:
2025-07-27 16:09:37 +00:00
- shelfy_upload:/app/upload
2025-08-18 16:35:07 +00:00
- shelfy_data:/app/data
- shelfy_logs:/var/log/shelfy
2025-07-27 14:26:30 +00:00
labels:
- traefik.http.routers.shelfy.middlewares=webdav-allow-methods@docker
- traefik.http.middlewares.webdav-allow-methods.headers.accesscontrolallowmethods=GET,PUT,POST,DELETE,PROPFIND,OPTIONS,LOCK,UNLOCK,HEAD
- traefik.http.middlewares.webdav-allow-methods.headers.accesscontrolallowheaders=Authorization,Depth,Content-Type,If-Modified-Since,User-Agent,Destination,Overwrite
2025-07-27 15:07:57 +00:00
dns:
- 8.8.8.8
- 1.1.1.1
2025-07-27 16:09:37 +00:00
restart: unless-stopped
2025-08-18 16:35:07 +00:00
# (pas besoin d'un command ici si l'ENTRYPOINT du Dockerfile fait déjà le tee)
2025-08-18 16:30:07 +00:00
fail2ban:
image: crazymax/fail2ban:latest
container_name: fail2ban
network_mode: host
2025-08-18 16:35:07 +00:00
cap_add: [ "NET_ADMIN", "NET_RAW" ]
2025-08-18 16:30:07 +00:00
environment:
- TZ=Europe/Paris
- F2B_LOG_TARGET=STDOUT
- F2B_DB_PURGE_AGE=1d
volumes:
2025-08-18 16:35:07 +00:00
- ./fail2ban:/data
- shelfy_logs:/var/log/shelfy:ro
2025-08-18 16:30:07 +00:00
restart: unless-stopped
2025-07-27 14:26:30 +00:00
volumes:
2025-07-27 15:07:57 +00:00
shelfy_upload:
2025-08-18 16:35:07 +00:00
shelfy_data:
2025-08-18 16:30:07 +00:00
shelfy_logs: