diff options
| author | ckonstanski <kostcarl@isu.edu> | 2026-08-15 18:14:22 -0600 |
|---|---|---|
| committer | ckonstanski <kostcarl@isu.edu> | 2026-08-15 18:14:22 -0600 |
| commit | f4a799d630280a44921376e101d45f337aeb7af9 (patch) | |
| tree | 13f879dc526755763052be78059c4ab846bf11c1 /ci | |
| parent | b19f361c2d01d72805eee64e00ff601551e3a8fe (diff) | |
Diffstat (limited to 'ci')
| -rw-r--r-- | ci/Dockerfile | 10 | ||||
| -rwxr-xr-x | ci/data/install-root.sh | 14 | ||||
| -rwxr-xr-x | ci/data/start_app.sh | 13 | ||||
| -rw-r--r-- | ci/docker-compose.yaml.example | 24 | ||||
| -rw-r--r-- | ci/env.sh | 8 |
5 files changed, 36 insertions, 33 deletions
diff --git a/ci/Dockerfile b/ci/Dockerfile index 18a0dab..b6cce8d 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -1,12 +1,12 @@ FROM ubuntu:noble MAINTAINER Carlos Konstanski ADD tmp/docker-start.tar.xz / -ARG OLO_USERNAME=root -ARG OLO_GROUPNAME=root -ARG OLO_UID=0 -ARG OLO_GID=0 +ARG USER_USERNAME=root +ARG USER_GROUPNAME=root +ARG USER_UID=0 +ARG USER_GID=0 RUN data/install-root.sh -USER ${OLO_UID}:${OLO_GID} +USER ${USER_UID}:${USER_GID} RUN data/install-user-sbcl.sh ENTRYPOINT [ "data/start_app.sh" ] #ENTRYPOINT [ "/bin/bash", "-l", "-c" ] diff --git a/ci/data/install-root.sh b/ci/data/install-root.sh index 1aacb79..68e0d8a 100755 --- a/ci/data/install-root.sh +++ b/ci/data/install-root.sh @@ -12,18 +12,18 @@ aptitude -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--f rsync -av /data/ / -if (( OLO_UID != 0 )); then +if (( USER_UID != 0 )); then userdel ubuntu || true groupdel ubuntu || true rm -rf /home/ubuntu || true - export HOMEDIR="/home/${OLO_USERNAME}" - groupadd -g "${OLO_GID}" "${OLO_GROUPNAME}" || OLO_GROUPNAME=$(grep -F "x:${OLO_GID}:" /etc/group | awk -F: '{print $1}') - useradd -s /bin/bash -m -u "${OLO_UID}" -g "${OLO_GROUPNAME}" "${OLO_USERNAME}" || OLO_USERNAME=$(grep -F "x:${OLO_UID}:" /etc/passwd | awk -F: '{print $1}') - SUDOERS_FILENAME="${OLO_USERNAME//\./_}" - echo "${OLO_USERNAME} ALL=(ALL) NOPASSWD: ALL" > "/etc/sudoers.d/${SUDOERS_FILENAME}" + export HOMEDIR="/home/${USER_USERNAME}" + groupadd -g "${USER_GID}" "${USER_GROUPNAME}" || USER_GROUPNAME=$(grep -F "x:${USER_GID}:" /etc/group | awk -F: '{print $1}') + useradd -s /bin/bash -m -u "${USER_UID}" -g "${USER_GROUPNAME}" "${USER_USERNAME}" || USER_USERNAME=$(grep -F "x:${USER_UID}:" /etc/passwd | awk -F: '{print $1}') + SUDOERS_FILENAME="${USER_USERNAME//\./_}" + echo "${USER_USERNAME} ALL=(ALL) NOPASSWD: ALL" > "/etc/sudoers.d/${SUDOERS_FILENAME}" chmod 0440 "/etc/sudoers.d/${SUDOERS_FILENAME}" mkdir -p "${HOMEDIR}/.gnupg" - chown "${OLO_USERNAME}":"${OLO_GROUPNAME}" "${HOMEDIR}/.gnupg" + chown "${USER_USERNAME}":"${USER_GROUPNAME}" "${HOMEDIR}/.gnupg" chmod 0700 "${HOMEDIR}/.gnupg" fi diff --git a/ci/data/start_app.sh b/ci/data/start_app.sh index 0b40f17..b5e6de1 100755 --- a/ci/data/start_app.sh +++ b/ci/data/start_app.sh @@ -3,12 +3,13 @@ mkdir -p ~/common-lisp/systems ~/opt cd ~/opt git clone -b master git@ns:repos/ldapadmin.git -git clone -b master git@github.com:ckonstanski/org-ckons-cljs.form.git -git clone -b master git@github.com:ckonstanski/org-ckons-cljs.notifications -git clone -b master git@github.com:ckonstanski/org-ckons-condition -git clone -b master git@github.com:ckonstanski/org-ckons-core -git clone -b master git@github.com:ckonstanski/org-ckons-http -git clone -b master git@github.com:ckonstanski/org-ckons-json + +git clone -b master git@ns:repos/org-ckons-cljs.form.git +git clone -b master git@ns:repos/org-ckons-cljs.notifications +git clone -b master git@ns:repos/org-ckons-condition +git clone -b master git@ns:repos/org-ckons-core +git clone -b master git@ns:repos/org-ckons-http +git clone -b master git@ns:repos/org-ckons-json logdir="/var/log/lisp" mv -f ${logdir}/ldapadmin.log.1 ${logdir}/ldapadmin.log.2 diff --git a/ci/docker-compose.yaml.example b/ci/docker-compose.yaml.example index 4c48af6..621c6d9 100644 --- a/ci/docker-compose.yaml.example +++ b/ci/docker-compose.yaml.example @@ -8,31 +8,31 @@ services: build: context: . args: - OLO_USERNAME: ${OLO_USERNAME} - OLO_GROUPNAME: ${OLO_GROUPNAME} - OLO_UID: ${OLO_UID} - OLO_GID: ${OLO_GID} + USER_USERNAME: ${USER_USERNAME} + USER_GROUPNAME: ${USER_GROUPNAME} + USER_UID: ${USER_UID} + USER_GID: ${USER_GID} network_mode: "host" container_name: ldapadmin volumes: - type: bind source: ~/.m2 - target: /home/${OLO_USERNAME}/.m2 + target: /home/${USER_USERNAME}/.m2 - type: bind source: ~/.bashrc - target: /home/${OLO_USERNAME}/.bashrc + target: /home/${USER_USERNAME}/.bashrc - type: bind source: ~/.bash_history - target: /home/${OLO_USERNAME}/.bash_history + target: /home/${USER_USERNAME}/.bash_history - type: bind source: ~/.vimrc - target: /home/${OLO_USERNAME}/.vimrc + target: /home/${USER_USERNAME}/.vimrc - type: bind source: ~/.gitconfig - target: /home/${OLO_USERNAME}/.gitconfig + target: /home/${USER_USERNAME}/.gitconfig - type: bind source: ~/.ssh - target: /home/${OLO_USERNAME}/.ssh + target: /home/${USER_USERNAME}/.ssh - type: bind source: /etc/hosts target: /etc/hosts @@ -40,6 +40,9 @@ services: source: /etc/ssh target: /etc/ssh - type: bind + source: /etc/ldapadmin + target: /etc/ldapadmin + - type: bind source: /var/log/lisp target: /var/log/lisp environment: @@ -47,4 +50,3 @@ services: - https_proxy=${https_proxy} - http_proxy=${http_proxy} - no_proxy=${no_proxy} - - GITHUB_TOKEN=${GITHUB_TOKEN} @@ -1,4 +1,4 @@ -export OLO_USERNAME=$(id -un) -export OLO_GROUPNAME=$(id -gn) -export OLO_UID=$(id -u) -export OLO_GID=$(id -g) +export USER_USERNAME=$(id -un) +export USER_GROUPNAME=$(id -gn) +export USER_UID=$(id -u) +export USER_GID=$(id -g) |
