module: add openssh
diff --git a/module/compose/scheme.sh b/module/compose/scheme.sh
index 17255ca..e134384 100644
--- a/module/compose/scheme.sh
+++ b/module/compose/scheme.sh
@@ -26,8 +26,12 @@
declare -r compose_has_mount_media="\
- ${_APACHE_HTML_PHOTOS_D_}:/var/www/html/photos
- ${_APACHE_HTML_VIDEOS_D_}:/var/www/html/videos"
+ declare -r compose_openssh_has_mount_media="\
+ - ${_APACHE_HTML_PHOTOS_D_}:${_APACHE_HTML_PHOTOS_D_}
+ - ${_APACHE_HTML_VIDEOS_D_}:${_APACHE_HTML_VIDEOS_D_}"
else
declare -r compose_has_mount_media=""
+ declare -r compose_openssh_has_mount_media=""
fi
if [ "${_GERRIT_HAS_HTTPS_}" -eq 1 ]; then
@@ -75,8 +79,14 @@
- CANONICAL_WEB_URL=${_GERRIT_CANON_URL_}
- LISTEN_URL=${_GERRIT_LISTEN_URL_}
- HOOKS_REMOTE_ALIAS=${_GERRIT_HOOKS_REMOTE_NAME_}
- - HOOKS_REMOTE_HOST=${_APACHE_DKRC_FRONTEND_IP_}
- HOOKS_REMOTE_RSAID=${_GERRIT_SSH_RSA_ID_F_}
+ - HOOKS_REMOTE_HOST=${_OPENSSH_IP_}
+ - HOOKS_REMOTE_PATH=${_OPENSSH_MIRROR_CON_D_}
+ - HOOKS_REMOTE_PORT=${_OPENSSH_PORT_}
+ - HOOKS_REMOTE_USER=${_OPENSSH_GIT_USER_}
+ - HOOKS_GERRIT_HOST=${host_name}
+ - HOOKS_GERRIT_PORT=${_GERRIT_SSH_PORT_}
+ - HOOKS_DEPLOY_EXEC=${_OPENSSH_TOD_EXEC_}
- HOOKS_LOG_DIR=${_GERRIT_HOOKS_LOG_CON_D_}
depends_on:
- ${_APACHE_DKRC_SERVICE_}
@@ -140,7 +150,36 @@
- ${_MYSQL_INITDB_F_}:/docker-entrypoint-initdb.d/initdb.sql
- ${_MYSQL_MYCONF_F_}:/etc/mysql/my.cnf:ro
- ${_MYSQL_MYSQL_D_}:/var/lib/mysql
- - ${_MYSQL_LOG_D_}:${_MYSQL_CON_LOG_D_}"
+ - ${_MYSQL_LOG_D_}:${_MYSQL_CON_LOG_D_}
+ ${_OPENSSH_DKRC_SERVICE_}:
+ environment:
+ - PUID=${_OPENSSH_GIT_UID_}
+ - PGID=${_OPENSSH_GIT_GID_}
+ - TZ=Europe/London
+ - SUDO_ACCESS=true
+ - PASSWORD_ACCESS=false
+ - USER_NAME=${_OPENSSH_GIT_USER_}
+ - PUBLIC_KEY_FILE=${_OPENSSH_CLIENT_PUBKEY_}
+ image: ${_OPENSSH_DKRC_IMAGE_}
+ build:
+ context: ${_OPENSSH_DKRC_CONTEXT_}
+ dockerfile: ${_OPENSSH_DKRC_DOCKERFILE_}
+ container_name: ${_OPENSSH_DKRC_CONTAINER_}
+ restart: unless-stopped
+ networks:
+ frontend:
+ ipv4_address: ${_OPENSSH_IP_}
+ expose:
+ - ${_OPENSSH_PORT_}
+ volumes:
+ - ${_GERRIT_HOST_RSA_ID_F_}.pub:${_OPENSSH_CLIENT_PUBKEY_}
+ - ${_OPENSSH_MIRROR_D_}:${_OPENSSH_MIRROR_CON_D_}
+ - ${_OPENSSH_TOD_D_}:${_OPENSSH_TOD_CON_D_}
+ - ${_OPENSSH_LOG_D_}:/config/logs
+ - ${_APACHE_DKRC_WWW_D_}:/rootfs/var/www
+ - ${_GERRIT_DKRC_HOOKS_D_}:/rootfs/hooks
+ - ${_GERRIT_DKRC_ETC_D_}:/rootfs/etc
+${compose_openssh_has_mount_media}"
declare -r environment_t="\
MYSQL_DATABASE=${_MYSQL_DB_NAME_}