summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: b7f0bd672221e7fc9100574a03020bdfe18638dc (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
# Common environment vars
# These are the credentials for the portal
# And the URI of the server
x-common-env: &common-env
  PORTAL_USER: ${PORTAL_USER}
  PORTAL_PASS: ${PORTAL_PASS}
  OAUTH_EXPIRED_TTL: ${OAUTH_EXPIRED_TTL}
  SERVER_URI: "https://eduvpnserver"

# Defines the services
services:
  # The eduvpn server with portal
  eduvpnserver:
    build:
      context: .
      dockerfile: ci/docker/eduvpnserver.docker
    sysctls: # needed for wireguard permissions, otherwise we get a permisison failed
      - net.ipv6.conf.all.disable_ipv6=0
    cap_add: # needed for wireguard
      - NET_ADMIN
    environment: *common-env
    healthcheck:
        test: ["CMD", "/eduvpn/server/healthcheck.sh"] # Wait for wireguard to come online
        interval: 5s
        timeout: 10s
        retries: 10
  # The container for testing the go code
  gotest:
    build:
      context: .
      dockerfile: ci/docker/gotest.docker
    environment: *common-env
    # Wait for eduvpn server to come online
    depends_on:
      eduvpnserver:
        condition: service_healthy