-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (112 loc) · 2.55 KB
/
docker-compose.yml
File metadata and controls
118 lines (112 loc) · 2.55 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
services:
# GeoDNS server with SQLite (simplest setup)
geodns:
build: .
container_name: namedot
restart: unless-stopped
ports:
- "8053:53/udp"
- "8053:53/tcp"
- "18080:8080/tcp"
volumes:
- ./examples/config.docker.yaml:/app/config.yaml:ro
- geodns-data:/data
- ./geoipdb:/app/geoipdb:ro
environment:
- TZ=UTC
networks:
- geodns-net
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
# Example: GeoDNS with PostgreSQL
geodns-postgres:
build: .
container_name: namedot-postgres
restart: unless-stopped
ports:
- "8054:53/udp"
- "8054:53/tcp"
- "18081:8080/tcp"
volumes:
- ./examples/config.postgres.yaml:/app/config.yaml:ro
- ./geoipdb:/app/geoipdb:ro
environment:
- TZ=UTC
depends_on:
postgres:
condition: service_healthy
networks:
- geodns-net
profiles:
- postgres
postgres:
image: postgres:16-alpine
container_name: geodns-postgres
restart: unless-stopped
environment:
POSTGRES_DB: geodns
POSTGRES_USER: geodns
POSTGRES_PASSWORD: geodns_secret
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- geodns-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U geodns"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- postgres
# Example: GeoDNS with MySQL
geodns-mysql:
build: .
container_name: namedot-mysql
restart: unless-stopped
ports:
- "8055:53/udp"
- "8055:53/tcp"
- "18082:8080/tcp"
volumes:
- ./examples/config.mysql.yaml:/app/config.yaml:ro
- ./geoipdb:/app/geoipdb:ro
environment:
- TZ=UTC
depends_on:
mysql:
condition: service_healthy
networks:
- geodns-net
profiles:
- mysql
mysql:
image: mysql:8.0
container_name: geodns-mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: geodns
MYSQL_USER: geodns
MYSQL_PASSWORD: geodns_secret
MYSQL_ROOT_PASSWORD: root_secret
volumes:
- mysql-data:/var/lib/mysql
networks:
- geodns-net
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "geodns", "-pgeodens_secret"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- mysql
volumes:
geodns-data:
postgres-data:
mysql-data:
networks:
geodns-net:
driver: bridge