From a62b3c37afde0ca8831f5ec7765a002aee9a2454 Mon Sep 17 00:00:00 2001 From: redxef Date: Wed, 17 Jan 2024 22:14:52 +0100 Subject: [PATCH] Add debug build into docker containers. --- dev/README.md | 15 +++++++++++++++ dev/docker-compose.yaml.tmpl | 1 + dev/{wireguard-configs.yaml => setup.yaml} | 0 3 files changed, 16 insertions(+) create mode 100644 dev/README.md rename dev/{wireguard-configs.yaml => setup.yaml} (100%) diff --git a/dev/README.md b/dev/README.md new file mode 100644 index 0000000..6933c57 --- /dev/null +++ b/dev/README.md @@ -0,0 +1,15 @@ +# Start developing + +## One time setup + +**The binary has to be compiled with the musl target:** +``` +$ rustup target add x86_64-unknown-linux-musl +$ cargo build --target=x86_64-unknown-linux-musl +``` + +1. Run `ansible-playbook setup.yaml` to generate all required + development files. +2. Run `docker compose up -d` to start 4 development servers which are + connected via wireguard. + diff --git a/dev/docker-compose.yaml.tmpl b/dev/docker-compose.yaml.tmpl index 4804948..b9a3c2f 100644 --- a/dev/docker-compose.yaml.tmpl +++ b/dev/docker-compose.yaml.tmpl @@ -8,6 +8,7 @@ services: context: ./server/ volumes: - ./config/{{ item.item }}-wg0.conf:/etc/wireguard/wg0.conf + - ../target/x86_64-unknown-linux-musl/debug/wgvirtipd:/usr/local/bin/wgvirtipd networks: - default expose: diff --git a/dev/wireguard-configs.yaml b/dev/setup.yaml similarity index 100% rename from dev/wireguard-configs.yaml rename to dev/setup.yaml