diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-01-05 13:30:07 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-01-05 13:32:27 +0100 |
| commit | 83f9bc5e1314c32422d4030763853e76fd56290c (patch) | |
| tree | ce5d3cbb24f34ce9817b42ed8f8f0c714bd9f441 /docker-compose.yml | |
| parent | 6f6c89eac6a6a5d036be4f2f826d8d96c1052b88 (diff) | |
CI: Support Podman as an alternative to Docker
Podman-compose (can be aliased to docker-compose now) does not have
the exact same options. We move the compose file to the root to
support podman. This is also better because users can just execute
docker-compose in the root.
Diffstat (limited to 'docker-compose.yml')
| -rw-r--r-- | docker-compose.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6483a7a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +version: '3' + +# 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 |
