-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathdocker-compose.yml
63 lines (61 loc) · 1.55 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
version: '3'
services:
mysql:
image: mariadb:10.6
container_name: mysql
restart: always
command: --character-set-server=utf8 --collation-server=utf8_general_ci
environment:
DB_USER: $DB_USER
DB_PORT: $DB_PORT
MARIADB_ROOT_PASSWORD: $DB_PASSWORD
MARIADB_DATABASE: $DB_NAME
healthcheck:
test: "mysql -h127.0.0.1 -P$$DB_PORT -u$$DB_USER -p$$MARIADB_ROOT_PASSWORD -e 'SHOW DATABASES;'"
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
networks:
- net
dnslog:
build:
context: .
dockerfile: Dockerfile
image: dnslog
container_name: dnslog
restart: always
environment:
DB_HOST: $DB_HOST
DB_PORT: $DB_PORT
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
SECRET_KEY: $SECRET_KEY
DNS_DOMAIN: $DNS_DOMAIN
ADMIN_DOMAIN: $ADMIN_DOMAIN
NS1_DOMAIN: $NS1_DOMAIN
NS2_DOMAIN: $NS2_DOMAIN
SERVER_IP: $SERVER_IP
depends_on:
- mysql
ports:
- 53:53/tcp
- 53:53/udp
- 8080:80/tcp
command: /bin/bash -c "envsubst '$$ADMIN_DOMAIN,$$DNS_DOMAIN' < /dnslog/dnslog_nginx.conf > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
healthcheck:
test: "wget -nv -t1 --spider http://localhost/login --no-check-certificate > /dev/null"
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
networks:
- net
networks:
net:
driver: bridge
ipam:
driver: default
config:
- subnet: $DOCKER_SUBNET