-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
79 lines (75 loc) · 1.91 KB
/
docker-compose.yaml
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
version: "3.6"
services:
postgres:
container_name: postgres
image: postgres:14-alpine3.17
ports:
- "127.0.0.1:5432:5432"
volumes:
- pgdata:/data/postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=wg
networks:
- postgres
healthcheck:
test: "pg_isready --username=postgres && psql --username=postgres --list"
timeout: 10s
retries: 20
restart: unless-stopped
pgadmin:
links:
- postgres:postgres
container_name: pgadmin
image: dpage/pgadmin4
ports:
- "127.0.0.1:8080:80"
volumes:
- pgadmindata:/var/lib/pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
- PGADMIN_DEFAULT_PASSWORD=admin
networks:
- postgres
depends_on:
- postgres
restart: unless-stopped
wireguard:
build:
context: .
dockerfile: Dockerfile.wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- WG_GRPC_API_HOST=0.0.0.0
- WG_GRPC_API_PORT=3000
- WG_GRPC_API_SWAGGER=true
- WG_GRPC_API_TOKENS=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTY4OTc4NTEwNSwiZXhwIjoxNjg5Nzg4NzA1fQ.lQWZuJVDmz1dUoYz8Y1PdKZxL4pJpIbHCf4Etfm4hx4
- WG_GRPC_API_DB_HOST=postgres
- WG_GRPC_API_DB_PORT=5432
- WG_GRPC_API_DB_NAME=wg
- WG_GRPC_API_DB_USERNAME=postgres
- WG_GRPC_API_DB_PASSWORD=postgres
networks:
- postgres
ports:
- 51820:51820/udp
- 127.0.0.1:3000:3000/tcp
depends_on:
postgres:
condition: service_healthy
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.forwarding=1
networks:
postgres:
driver: bridge
volumes:
pgdata:
driver: local
pgadmindata:
driver: local