# HG changeset patch # User Richard Westhaver # Date 1722212213 14400 # Node ID b5ff3e39b424a2ab3de6367ba8d706212ab2b958 # Parent 058ae6eb8c06f5190e7bb1b6dfe1ae597c0386b8 web diff -r 058ae6eb8c06 -r b5ff3e39b424 Containerfile.alpine-infra --- a/Containerfile.alpine-infra Sat Jul 27 02:21:46 2024 -0400 +++ b/Containerfile.alpine-infra Sun Jul 28 20:16:53 2024 -0400 @@ -6,12 +6,6 @@ RUN mkdir -pv .stash/src .stash/tmp RUN ./scripts/install-rocksdb-pack.sh x86_64-unknown-linux-musl RUN ./scripts/install-sbcl-pack.sh x86_64-unknown-linux-musl -RUN cd .stash && curl -O https://beta.quicklisp.org/quicklisp.lisp -RUN ./scripts/quicklisp-install.sh -RUN hg clone https://vc.compiler.company/comp/home .stash/src/home -# TODO update home/worker -RUN cd .stash/src/home && hg update ellis && cp .sbclrc ~/ -RUN sbcl --eval "(ql:quickload '(cl-ppcre flexi-streams quri))" RUN ./scripts/install-core-pack.sh x86_64-unknown-linux-musl RUN ssh-keygen -A RUN skel clean \ No newline at end of file diff -r 058ae6eb8c06 -r b5ff3e39b424 Containerfile.operator --- a/Containerfile.operator Sat Jul 27 02:21:46 2024 -0400 +++ b/Containerfile.operator Sun Jul 28 20:16:53 2024 -0400 @@ -1,7 +1,7 @@ FROM localhost/dev:latest USER root RUN usermod -l operator --move-home --home /home/operator ${DEV} -RUN echo "operator ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/operator # yuck +RUN echo "operator ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/operator USER operator WORKDIR /home/operator RUN hg clone https://vc.compiler.company/comp/infra .stash/infra diff -r 058ae6eb8c06 -r b5ff3e39b424 Containerfile.web --- a/Containerfile.web Sat Jul 27 02:21:46 2024 -0400 +++ b/Containerfile.web Sun Jul 28 20:16:53 2024 -0400 @@ -1,26 +1,25 @@ -FROM localhost/dev:latest +FROM localhost/alpine-infra:latest ARG WEB_USER=web ARG WEB_HOME=/home/${WEB_USER} ARG WEB_ID=840 USER root -RUN --network=host pacman -Sy go --noconfirm -RUN useradd --system -s /usr/bin/bash -u ${WEB_ID} -m ${WEB_USER} -USER ${WEB_USER} -WORKDIR ${WEB_HOME} -RUN hg clone https://vc.compiler.company/comp/infra .stash/infra -RUN .stash/infra/scripts/wg-gen-keys.sh private.key public.key -RUN hg clone https://vc.compiler.company/comp/home .stash/home -RUN cd .stash/home && hg up ${WEB_USER} && cp .homerc ${WEB_HOME}/.homerc -RUN homer install -RUN hg clone https://vc.compiler.company/comp/org .stash/org -RUN mkdir .stash/www +RUN --network=host apk add go +RUN addgroup -g 840 web +RUN adduser -D -u ${WEB_ID} -G web ${WEB_USER} USER root -WORKDIR .stash/infra +RUN hg up RUN skel make xcaddy RUN skel make caddy && skel make caddy-install RUN skel clean USER ${WEB_USER} WORKDIR ${WEB_HOME} -ENV WEB_USER=${WEB_USER} +RUN mkdir -p ${WEB_HOME}/.stash +RUN hg clone https://vc.compiler.company/comp/home ${WEB_HOME}/.stash/home +RUN cd ${WEB_HOME}/.stash/home && hg up ${WEB_USER} && cp caddy.json ${WEB_HOME}/caddy.json +RUN hg clone https://vc.compiler.company/comp/org ${WEB_HOME}/org +RUN mkdir -p ${WEB_HOME}/www ENV WEB_ID=${WEB_ID} -ENTRYPOINT ["caddy"] \ No newline at end of file +ENV WEB_USER=${WEB_USER} +CMD ["run", "-c", "caddy.json"] +ENTRYPOINT ["caddy"] +EXPOSE 2020 8080 8443 \ No newline at end of file diff -r 058ae6eb8c06 -r b5ff3e39b424 skelfile --- a/skelfile Sat Jul 27 02:21:46 2024 -0400 +++ b/skelfile Sun Jul 28 20:16:53 2024 -0400 @@ -13,3 +13,13 @@ (:containerfile "operator") (:containerfile "worker") (:containerfile "web")) +:rules +((web () #$podman run --name web --replace -dt -p 8080:8080 -p 2020:2020 \ + --volume /srv/http:/home/web/www \ + web$#) + (operator () #$podman run --name operator --replace -dt operator$#) + (vc () #$podman run --name vc --replace -dt -p 8888:8888 vc$#) + (dev () #$podman run --name dev --replace -dt dev$#) + (mail () #$podman run --name mail --replace -dt mail$#) + (alpine-infra () #$podman run --name alpine-infra --replace -dt alpine-infra$#) + (worker () #$podman run --name worker --replace -dt worker$#))