aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker-compose.yml
blob: 82b228a7822cefb07b865364c4ad102d7e8feae7 (plain) (blame)
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
version: '3.4'

x-default-settings:
  &default-settings
  logging:
    driver: journald
  restart: unless-stopped

services:
  web:
    << : *default-settings
    depends_on: [api]
    image: egortensin/wg-api-web:1
    ports:
      - '8090:80'
    volumes:
      - './data:/data:ro'
  api:
    << : *default-settings
    # Pin to 'latest' or to a different hash if running on something other than
    # x64. The hash was used because the upstream image doesn't use versions
    # (as of Jan 2023).
    image: james/wg-api@sha256:76428f4fe0efee9e0d17c8d89920535d536675f604a9f5081075615cac0d2411
    cap_add:
      - NET_ADMIN
    network_mode: host
    command: wg-api --device "${WG_IFACE:-wg0}" --listen 192.168.177.1:1234

networks:
  default:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 192.168.177.0/24