summaryrefslogtreecommitdiff
path: root/docker/integration_test/web/setup.sh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-02-09 23:56:38 +0100
committerJoel Klinghed <the_jk@spawned.biz>2025-02-09 23:56:38 +0100
commitbf025b4977543a371df9dbdddfe9cc2f02f2a8d0 (patch)
treefc8937a3b5f3311ff7b8209aec3961668ac83d8c /docker/integration_test/web/setup.sh
parentbd74717e10fb36e19893c15941876b2383b94714 (diff)
First integration test
Sets up a whole slew of docker instances, all started from clean slate for test.
Diffstat (limited to 'docker/integration_test/web/setup.sh')
-rwxr-xr-xdocker/integration_test/web/setup.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/docker/integration_test/web/setup.sh b/docker/integration_test/web/setup.sh
new file mode 100755
index 0000000..bd6c805
--- /dev/null
+++ b/docker/integration_test/web/setup.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+echo "[default]" > Rocket.toml
+echo "address = \"0.0.0.0\"" >> Rocket.toml
+echo "secret_key = \"itlYmFR2vYKrOmFhupMIn/hyB6lYCCTXz4yaQX89XVg=\"" >> Rocket.toml
+echo "session_max_age_days = 7" >> Rocket.toml
+echo "ldap_url = \"$LDAP_URL\"" >> Rocket.toml
+echo "ldap_users = \"ou=users,dc=example,dc=org\"" >> Rocket.toml
+echo "ldap_filter = \"(objectClass=posixAccount)\"" >> Rocket.toml
+echo "git_server_root = \"/git/repos\"" >> Rocket.toml
+echo "authorized_keys = \"/git/auth/authorized_keys\"" >> Rocket.toml
+echo "git_hook = \"/git/repos/eyeballs-githook\"" >> Rocket.toml
+echo "[default.databases.eyeballs]" >> Rocket.toml
+echo "url = \"$DB_URL\"" >> Rocket.toml
+
+export RUST_BACKTRACE=1
+export HOME=/app
+
+echo "Host remote_git" > /app/.ssh/config
+echo " StrictHostKeyChecking no" >> /app/.ssh/config
+
+# Hardlinks cannot cross devices, so copy to the /git/repos mount.
+cp /app/eyeballs-githook /git/repos/eyeballs-githook
+
+exec ./eyeballs