-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
84 lines (81 loc) · 2.56 KB
/
docker-compose.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3'
services:
traefik:
image: "traefik:v2.8"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=false"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=$LETSENCRYPT_MAIL"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: "always"
mysql:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=$MYSQL_PASSWORD
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_USER=$MYSQL_USER
- MYSQL_DATABASE=$MYSQL_DATABASE
volumes:
- db_data:/var/lib/mysql
restart: "always"
pure-ftpd-mysql:
container_name: "pure-ftpd-mysql"
image: "atplusdigital/pftp-pureftpd"
ports:
- "20-21:20-21"
- "30000-30009:30000-30009"
volumes:
- "./cert/pure-ftpd.pem:/etc/ssl/private/imported.pem:ro"
- "/etc/localtime:/etc/localtime:ro"
- ftp_data:/ftpdata
environment:
- "EXTERNAL_IP=$EXTERNAL_IP"
- "MYSQL_HOST=$MYSQL_HOST"
- "MYSQL_PORT=$MYSQL_PORT"
- "MYSQL_USER=$MYSQL_USER"
- "MYSQL_PASSWORD=$MYSQL_PASSWORD"
- "MYSQL_DATABASE=$MYSQL_DATABASE"
depends_on:
- mysql
restart: "always"
pftp:
container_name: pftp
image: atplusdigital/pftp
environment:
- MYSQL_HOST=$MYSQL_HOST
- MYSQL_PORT=$MYSQL_PORT
- MYSQL_USER=$MYSQL_USER
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_DATABASE=$MYSQL_DATABASE
- ADMIN_PASSWORD=$ADMIN_PASSWORD
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=(Host(`$DOMAIN_SERVER`))"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=myresolver"
depends_on:
- pure-ftpd-mysql
- traefik
volumes:
- ftp_data:/ftpdata
restart: "always"
volumes:
db_data:
ftp_data:
letsencrypt: