-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
50 lines (50 loc) · 1.31 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
version: '3.3'
volumes:
pgdata:
driver: local
driver_opts:
o: bind
type: none
device: /opt/pg_data
wgdata:
driver: local
driver_opts:
o: bind
type: none
device: /opt/wg_data
services:
db:
image: postgres:13-alpine
container_name: wg_database
restart: "unless-stopped"
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
volumes:
- "pgdata:/var/lib/postgresql/data"
bot:
image: mb0nd/wg_admin_bot:3.12
container_name: wg_admin_bot
stop_signal: SIGINT
restart: "unless-stopped"
environment:
API_TOKEN: ${API_TOKEN}
ADMIN_ID: ${ADMIN_ID}
PG_URL: ${PG_URL}
LISTEN_PORT: ${LISTEN_PORT}
HOST: ${HOST}
PATH_TO_WG: ${PATH_TO_WG}
TZ: ${TZ}
ports:
- ${LISTEN_PORT}:${LISTEN_PORT}/udp
cap_add:
- "NET_ADMIN"
volumes:
- "wgdata:${PATH_TO_WG}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 10
depends_on:
- db