-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (48 loc) · 1.51 KB
/
docker-compose.yml
File metadata and controls
53 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: "3.9"
services:
# ── Flask application ────────────────────────────────────────────────────
app:
build: .
container_name: ftpbackup_app
restart: unless-stopped
env_file: .env
volumes:
- uploads:/data/uploads
expose:
- "5000"
networks:
- internal
# ── Nginx reverse-proxy / SSL termination ─────────────────────────────
nginx:
image: nginx:alpine
container_name: ftpbackup_nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- certbot_webroot:/var/www/certbot:ro
- letsencrypt:/etc/letsencrypt:ro
depends_on:
- app
networks:
- internal
# ── Certbot (Let's Encrypt) ───────────────────────────────────────────
certbot:
image: certbot/certbot
container_name: ftpbackup_certbot
volumes:
- certbot_webroot:/var/www/certbot
- letsencrypt:/etc/letsencrypt
# Run manually: docker compose run certbot certonly ...
entrypoint: /bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done'
networks:
- internal
volumes:
uploads:
certbot_webroot:
letsencrypt:
networks:
internal: