-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
58 lines (55 loc) · 1.28 KB
/
docker-compose.test.yml
File metadata and controls
58 lines (55 loc) · 1.28 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
# Docker Compose для тестирования AIVPN (сервер + клиент в одной bridge-сети)
version: "3.8"
services:
aivpn-server:
build:
context: .
dockerfile: Dockerfile
container_name: aivpn-test-server
cap_add:
- NET_ADMIN
- NET_RAW
devices:
- /dev/net/tun:/dev/net/tun
tmpfs:
- /run:mode=1777,size=64M
- /tmp:mode=1777,size=128M
environment:
- RUST_LOG=info
- RUST_BACKTRACE=1
volumes:
- ./config:/etc/aivpn
networks:
aivpn-test:
aliases:
- aivpn-server
healthcheck:
test: ["CMD-SHELL", "ss -uulpn | grep 443 || exit 1"]
interval: 3s
timeout: 2s
retries: 10
start_period: 5s
aivpn-client:
build:
context: .
dockerfile: Dockerfile.client
container_name: aivpn-test-client
cap_add:
- NET_ADMIN
- NET_RAW
devices:
- /dev/net/tun:/dev/net/tun
tmpfs:
- /run:mode=1777,size=64M
- /tmp:mode=1777,size=128M
environment:
- RUST_LOG=info
depends_on:
aivpn-server:
condition: service_healthy
networks:
- aivpn-test
# Ключ будет передан через environment или command
networks:
aivpn-test:
driver: bridge