-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (84 loc) · 2.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (84 loc) · 2.09 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
services:
postgres:
image: postgres:17-alpine
container_name: netprobe_postgres
environment:
POSTGRES_DB: network_monitoring
POSTGRES_USER: exporter_user
POSTGRES_PASSWORD: exporter_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/postgres-init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro,z
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U exporter_user -d network_monitoring" ]
interval: 10s
timeout: 5s
retries: 5
mysql:
image: mysql:8.0
container_name: netprobe_mysql
environment:
MYSQL_DATABASE: network_monitoring
MYSQL_USER: exporter_user
MYSQL_PASSWORD: exporter_password
MYSQL_ROOT_PASSWORD: root_password
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./scripts/mysql-init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro,z
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 5s
retries: 5
# Test targets for pinging (IPv4)
test-target-1:
image: busybox:latest
command: sleep 3600
networks:
default:
ipv4_address: 172.20.0.100
ipv6_address: fd00::100
test-target-2:
image: busybox:latest
command: sleep 3600
networks:
default:
ipv4_address: 172.20.0.101
ipv6_address: fd00::101
test-target-3:
image: busybox:latest
command: sleep 3600
networks:
default:
ipv4_address: 172.20.0.102
ipv6_address: fd00::102
# IPv6-only test targets
test-target-ipv6-1:
image: busybox:latest
command: sleep 3600
networks:
default:
ipv6_address: fd00::200
test-target-ipv6-2:
image: busybox:latest
command: sleep 3600
networks:
default:
ipv6_address: fd00::201
volumes:
postgres_data:
mysql_data:
networks:
default:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: 172.20.0.0/16
gateway: 172.20.0.1
- subnet: fd00::/64
gateway: fd00::1