diff --git a/docker-compose.aur-dev.yml b/docker-compose.aur-dev.yml index 1db306cc..484f353a 100644 --- a/docker-compose.aur-dev.yml +++ b/docker-compose.aur-dev.yml @@ -18,6 +18,7 @@ services: restart: always volumes: - ${GIT_DATA_DIR}:/aurweb/aur.git + - ./data:/aurweb/data - cache:/cache smartgit: diff --git a/docker/git-entrypoint.sh b/docker/git-entrypoint.sh index 296c1e47..4d15bcb9 100755 --- a/docker/git-entrypoint.sh +++ b/docker/git-entrypoint.sh @@ -60,6 +60,13 @@ sed -ri "s|^(ssh-cmdline) = .+|\1 = $ssh_cmdline|" $AUR_CONFIG_DEFAULTS # Setup SSH Keys. ssh-keygen -A +# In docker-compose.aur-dev.yml, we bind ./data to /aurweb/data. +# Production users wishing to include their own SSH keys should +# supply them in ./data. +if [ -d /aurweb/data ]; then + find /aurweb/data -type f -name 'ssh_host_*' -exec cp -vf "{}" /etc/ssh/ \; +fi + # Taken from INSTALL. mkdir -pv $GIT_REPO