forked from extremeshok/docker-xmysql-https-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-sample-https-letsencrypt.yml
65 lines (65 loc) · 1.69 KB
/
docker-compose-sample-https-letsencrypt.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
version: '2.1'
########## SERVICES ########
services:
#
# In this example the system is running under HTTPS (ssl)
# Certificate is created via the acme container using letsencrypt
#
###### xshokxmysqlhttps
xshokxmysqlhttps:
image: extremeshok/xmysql-https-auth:latest
depends_on:
- mariadb
- xshokacmehttp
volumes:
- vol-certificates:/certs/:ro
environment:
- TZ=${TZ}
- SQL_HOST=mariadb
- SQL_PORT=3306
- SQL_DATABASE=${SQL_DATABASE}
- SQL_USERNAME=${SQL_USERNAME}
- SQL_PASSWORD=${SQL_PASSWORD}
- API_PREFIX=/
- API_FILTERTABLES=users,admins
- API_IGNORETABLES=backends,stats,sessions
- API_KEY=some-secure-key
- API_ALLOW_IP=192.1.0.0/24,10.10.10.10
- API_HTTP_AUTH=username:{PLAIN}password
# used for server name, ssl cert
- API_HOSTNAME=${HOSTNAME}
restart: always
links:
- mariadb:mariadb
ports:
- 3443:443
sysctls:
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
networks:
network:
ipv4_address: ${IPV4_NETWORK:-172.22.1}.202
aliases:
- xmysql
#
# https://github.com/extremeshok/docker-acme-http2https
#
###### xshokacmehttp
xshokacmehttp:
image: extremeshok/acme-http2https:latest
environment:
- TZ=${TZ}
- ACME_DOMAINS=${HOSTNAME}
- ACME_RESTART_CONTAINERS=xshokxmysqlhttps
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- vol-acme:/acme/:rw
- vol-certificates:/certs/:rw
ports:
- 80:80
restart: always
sysctls:
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
networks:
network:
aliases:
- xshokacmehttp