mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(docker): allow configurable SSH_CMDLINE in git service
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
ba3ef742ce
commit
a1e547c057
3 changed files with 7 additions and 2 deletions
|
@ -16,6 +16,10 @@ services:
|
||||||
|
|
||||||
git:
|
git:
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
- AUR_CONFIG=/aurweb/conf/config
|
||||||
|
# SSH_CMDLINE should be updated to production's ssh cmdline.
|
||||||
|
- SSH_CMDLINE=${SSH_CMDLINE:-ssh ssh://aur@localhost:2222}
|
||||||
volumes:
|
volumes:
|
||||||
- ${GIT_DATA_DIR}:/aurweb/aur.git
|
- ${GIT_DATA_DIR}:/aurweb/aur.git
|
||||||
- ./data:/aurweb/data
|
- ./data:/aurweb/data
|
||||||
|
|
|
@ -100,6 +100,7 @@ services:
|
||||||
init: true
|
init: true
|
||||||
environment:
|
environment:
|
||||||
- AUR_CONFIG=/aurweb/conf/config
|
- AUR_CONFIG=/aurweb/conf/config
|
||||||
|
- SSH_CMDLINE=${SSH_CMDLINE:-ssh ssh://aur@localhost:2222}
|
||||||
entrypoint: /docker/git-entrypoint.sh
|
entrypoint: /docker/git-entrypoint.sh
|
||||||
command: /docker/scripts/run-sshd.sh
|
command: /docker/scripts/run-sshd.sh
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -54,8 +54,8 @@ fi
|
||||||
# Set some defaults needed for pathing and ssh uris.
|
# Set some defaults needed for pathing and ssh uris.
|
||||||
sed -ri "s|^(repo-path) = .+|\1 = /aurweb/aur.git/|" $AUR_CONFIG_DEFAULTS
|
sed -ri "s|^(repo-path) = .+|\1 = /aurweb/aur.git/|" $AUR_CONFIG_DEFAULTS
|
||||||
|
|
||||||
ssh_cmdline='ssh ssh://aur@localhost:2222'
|
# SSH_CMDLINE can be provided via override in docker-compose.aur-dev.yml.
|
||||||
sed -ri "s|^(ssh-cmdline) = .+|\1 = $ssh_cmdline|" $AUR_CONFIG_DEFAULTS
|
sed -ri "s|^(ssh-cmdline) = .+$|\1 = ${SSH_CMDLINE}|" $AUR_CONFIG_DEFAULTS
|
||||||
|
|
||||||
# Setup SSH Keys.
|
# Setup SSH Keys.
|
||||||
ssh-keygen -A
|
ssh-keygen -A
|
||||||
|
|
Loading…
Add table
Reference in a new issue