mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(docker): allow user-customizable ssh host keys
There is a new ./data bind mount used here. If ssh_host_* keys are in ./data when the git service starts, they'll override the container-generated host keys. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
233d25b1c3
commit
ba3ef742ce
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,7 @@ services:
|
|||
restart: always
|
||||
volumes:
|
||||
- ${GIT_DATA_DIR}:/aurweb/aur.git
|
||||
- ./data:/aurweb/data
|
||||
- cache:/cache
|
||||
|
||||
smartgit:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue