Author: Adam <git@apiote.xyz>
bimba_server -> szczanieckiej
| 2 +- bimba_server/build.sh | 19 ------------------- szczanieckiej/build.sh | 16 ++++++++++++++++
diff --git a/bimba_server/Dockerfile b/bimba_server/Dockerfile deleted file mode 100644 index 4ab0af30079d52b3572ddd3c2ed39d053eb8b0c9..0000000000000000000000000000000000000000 --- a/bimba_server/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM alpine -RUN apk add git plan9port tar xz go openssh-client -RUN ln -s /usr/lib/plan9/bin/mk /usr/bin/mk -WORKDIR /root -RUN mkdir .ssh -COPY ssh_key .ssh/id_ed25519 -COPY known_hosts .ssh/known_hosts -COPY build.sh build.sh -RUN chmod 755 build.sh -ENTRYPOINT ["./build.sh"] diff --git a/bimba_server/build.sh b/bimba_server/build.sh deleted file mode 100755 index 638afcca553df7f0b94424596b857092d57bf2ba..0000000000000000000000000000000000000000 --- a/bimba_server/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -set -ex - -item="$1" - -git clone https://git.apiote.xyz/git/bimba_server.git -cd bimba_server -mk -tar cf bimba_server.txz bimba_server -commit=$(git show --pretty=oneline --abbrev-commit --name-only | head -n1 | cut -d ' ' -f 1) -timestamp=$(date '+%Y%m%dT%H%M') -scp bimba_server.txz deploy@host.containers.internal:toys/bimba_server/${item}/bimba_server_${timestamp}_${commit}.txz -ssh deploy@host.containers.internal "cp ~/toys/bimba_server/${item}/bimba_server_${timestamp}_${commit}.txz /tmp/bimba_server.txz" -ssh deploy@host.containers.internal "chmod a+rwX /tmp/bimba_server.txz" -ssh deploy@host.containers.internal "doas -u www cp /tmp/bimba_server.txz /var/www/bimba" -ssh deploy@host.containers.internal "rm /tmp/bimba_server.txz" -ssh deploy@host.containers.internal "doas -u www tar xavf /var/www/bimba/bimba_server.txz -C /var/www/bimba/" -ssh deploy@host.containers.internal "doas -u www doas /etc/init.d/bimba restart" diff --git a/szczanieckiej/Dockerfile b/szczanieckiej/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9e6c674f37e829753e3035057744648af0b77734 --- /dev/null +++ b/szczanieckiej/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine +RUN apk add git plan9port go openssh-client +RUN ln -s /usr/lib/plan9/bin/mk /usr/bin/mk +WORKDIR /root +RUN mkdir .ssh +COPY ssh_key .ssh/id_ed25519 +COPY known_hosts .ssh/known_hosts +COPY build.sh build.sh +RUN chmod 755 build.sh +ENTRYPOINT ["./build.sh"] diff --git a/szczanieckiej/build.sh b/szczanieckiej/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..f962d82501dfbadfa6014f671657b3c1c6ab80a7 --- /dev/null +++ b/szczanieckiej/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -ex + +item="$1" + +git clone https://git.apiote.xyz/git/szczanieckiej.git +cd szczanieckiej +mk +commit=$(git show --pretty=oneline --abbrev-commit --name-only | head -n1 | cut -d ' ' -f 1) +timestamp=$(date '+%Y%m%dT%H%M') +scp szczanieckiej deploy@host.containers.internal:toys/szczanieckiej/${item}/szczanieckiej_${timestamp}_${commit} +ssh deploy@host.containers.internal "cp ~/toys/szczanieckiej/${item}/szczanieckiej_${timestamp}_${commit} /tmp/szczanieckiej" +ssh deploy@host.containers.internal "chmod 755 /tmp/szczanieckiej" +ssh deploy@host.containers.internal "doas cp /tmp/szczanieckiej /usr/bin" +ssh deploy@host.containers.internal "doas -u www doas /etc/init.d/bimba restart"