summaryrefslogtreecommitdiff
path: root/ci/docker/docker-compose.yml
blob: f924571963dedba1aaa4c6c2ff02a016c7f954a7 (plain)
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
version: '3'

x-common-env: &common-env
  PORTAL_USER: ${PORTAL_USER}
  PORTAL_PASS: ${PORTAL_PASS}

networks:
  eduvpn_network:
    ipam:
        driver: default
        config:
          - subnet: 172.20.0.0/24

services:
  eduvpnserver:
    build:
      context: "."
      dockerfile: 'ci/docker/eduvpn-server.docker'
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=0
    networks:
      eduvpn_network:
        ipv4_address: 172.20.0.6
    cap_add: # needed for wireguard
      - NET_ADMIN
    environment: *common-env
    healthcheck:
        test: ["CMD", "systemctl", "status", "wg-quick@wg0"] # Wait for wireguard to come online
        interval: 5s
        timeout: 10s
        retries: 10
  gotest:
    build:
      context: "."
      dockerfile: 'ci/docker/go-test.docker'
    environment: *common-env
    networks:
      eduvpn_network:
        ipv4_address: 172.20.0.5
    depends_on:
      eduvpnserver:
        condition: service_healthy