-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (112 loc) · 3.39 KB
/
docker-compose.yml
File metadata and controls
119 lines (112 loc) · 3.39 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# =============================================================================
# myRBL Dockerized
#
# Copyright (C) 2024 [NukeDev - Gianmarco Varriale]
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# =============================================================================
services:
db:
image: mysql:latest
container_name: db_server
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- db_data:/var/lib/mysql
bind:
build:
context: ./rbl
container_name: dns_server
environment:
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
RBL_DOMAIN: ${RBL_DOMAIN}
NS_PUBLIC_IP_ADDRESS: ${NS_PUBLIC_IP_ADDRESS}
STAMPARM_URL_EXT_IP_ADDRESSES_BLACKLIST: ${STAMPARM_URL_EXT_IP_ADDRESSES_BLACKLIST}
URL_EXT_DOMAINS_BLACKLIST: ${URL_EXT_DOMAINS_BLACKLIST}
BIND_REFRESH_BLACKLIST_CRONJOB: ${BIND_REFRESH_BLACKLIST_CRONJOB}
EXT_BLACKLIST_CRONJOB: ${EXT_BLACKLIST_CRONJOB}
volumes:
- bind_cache:/var/cache/bind
ports:
- "53:53/udp"
- "53:53/tcp"
depends_on:
- db
restart: always
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
ports:
- "8080:80"
environment:
PMA_HOST: db
PMA_USER: ${DB_USER}
PMA_PASSWORD: ${DB_PASSWORD}
depends_on:
- db
php:
build:
context: ./web
dockerfile: Dockerfile-php
container_name: php_server
environment:
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
RBL_DOMAIN: ${RBL_DOMAIN}
NS_PUBLIC_IP_ADDRESS: ${NS_PUBLIC_IP_ADDRESS}
depends_on:
- bind
volumes:
- ./web/www:/var/www/html
caddy:
build:
context: ./web
dockerfile: Dockerfile-caddy
container_name: caddy_server
ports:
- "80:80"
- "443:443"
environment:
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
RBL_DOMAIN: ${RBL_DOMAIN}
NS_PUBLIC_IP_ADDRESS: ${NS_PUBLIC_IP_ADDRESS}
CERTBOT_EMAIL: ${CERTBOT_EMAIL}
USE_SSL: ${USE_SSL}
depends_on:
- bind
volumes:
- ./web/www:/var/www/html
- ./web/logs:/var/log/caddy
- caddy_data:/data
- caddy_config:/config
- caddy_certs:/etc/ssl/caddy
entrypoint: ["/bin/sh", "-c", "envsubst < /etc/caddy/Caddyfile.template > /etc/caddy/Caddyfile && caddy run --config /etc/caddy/Caddyfile"]
volumes:
db_data:
bind_cache:
caddy_data:
caddy_config:
caddy_certs: