summaryrefslogtreecommitdiff
path: root/docker/integration_test/web/setup.sh
blob: d8093b17b80041319bb633a46910b6123c135e82 (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
#!/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 = \"/srv/git\"" >> Rocket.toml
echo "authorized_keys = \"/git/auth/authorized_keys\"" >> Rocket.toml
echo "git_hook = \"/srv/git/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 /srv/git/eyeballs-githook

exec ./eyeballs