summaryrefslogtreecommitdiff
path: root/docker/integration_test/web
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-06-22 22:57:08 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-06-22 22:57:08 +0200
commitf9b7c2a14c939d0bb7d1ac2fcca3116e38e37f74 (patch)
treecc20775f2d70416ef6414d265b7e1d44cce6fece /docker/integration_test/web
parent9cb8a56b406c46244e936c2f40830d0e89dba785 (diff)
Add support for pushing changes to a translation review
Finally got around to fixing the pre-receive hook to include quarantined objects so the hook actually can run git commands on the not-yet-accepted commits. As part of that, had to make sure git hook and eyeballs server had the same path to the repo or confusion will appear.
Diffstat (limited to 'docker/integration_test/web')
-rw-r--r--docker/integration_test/web/Dockerfile8
-rwxr-xr-xdocker/integration_test/web/setup.sh6
2 files changed, 7 insertions, 7 deletions
diff --git a/docker/integration_test/web/Dockerfile b/docker/integration_test/web/Dockerfile
index b9b2ad7..b102d4d 100644
--- a/docker/integration_test/web/Dockerfile
+++ b/docker/integration_test/web/Dockerfile
@@ -8,19 +8,19 @@ COPY server/target/x86_64-unknown-linux-musl/debug/eyeballs-githook /app/eyeball
COPY server/target/debug/eyeballs /app/eyeballs
COPY docker/integration_test/web/setup.sh /app/setup.sh
-RUN mkdir -p /git/auth /git/repos
+RUN mkdir -p /git/auth /srv/git
# git image runs as default git user, with uid 1000 gid 1000.
# we need the same, but it can't be named git (as package git installs a git user)
# so add another user with 1000 gid 1000 and make sure that shared files
-# (/git/auth and /git/repos) are owned by that user and not root.
+# (/git/auth and /srv/git) are owned by that user and not root.
RUN useradd --no-create-home --uid 1000 --user-group -s /usr/bin/nologin alf
RUN chown alf:alf /app
RUN chown alf:alf /git/auth
-RUN chown alf:alf /git/repos
+RUN chown alf:alf /srv/git
VOLUME /git/auth
-VOLUME /git/repos
+VOLUME /srv/git
USER alf:alf
diff --git a/docker/integration_test/web/setup.sh b/docker/integration_test/web/setup.sh
index bd6c805..d8093b1 100755
--- a/docker/integration_test/web/setup.sh
+++ b/docker/integration_test/web/setup.sh
@@ -7,9 +7,9 @@ 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 "git_server_root = \"/srv/git\"" >> Rocket.toml
echo "authorized_keys = \"/git/auth/authorized_keys\"" >> Rocket.toml
-echo "git_hook = \"/git/repos/eyeballs-githook\"" >> Rocket.toml
+echo "git_hook = \"/srv/git/eyeballs-githook\"" >> Rocket.toml
echo "[default.databases.eyeballs]" >> Rocket.toml
echo "url = \"$DB_URL\"" >> Rocket.toml
@@ -20,6 +20,6 @@ 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
+cp /app/eyeballs-githook /srv/git/eyeballs-githook
exec ./eyeballs