Final changes before moving to cgit

This commit is contained in:
Sameer Rahmani 2023-07-16 22:27:57 +01:00
parent 7acbd71876
commit af92a65229
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
5 changed files with 37 additions and 15 deletions

View File

@ -1,13 +1,10 @@
FROM scratch
FROM lscr.io/linuxserver/openssh-server:latest
ENV USER_NAME=git
RUN apk add --no-cache --upgrade git lighttpd tor git-gitweb python3
COPY --from=lscr.io/linuxserver/openssh-server:latest / /
COPY /root/ /
RUN apk add --no-cache --upgrade git lighthttpd tor \
&& mkdir -p /repo && cd /repo && git init . --bare \
&& mkdir -p /var/lib/tor/git \
&& mkdir -p /var/lib/tor/gitweb \
COPY /root /
COPY
CMD ["tor", "--runasdaemon 0"]
CMD ["/bin/bash", "/usr/local/bin/run-tor.sh"]#["tor", "--runasdaemon", "0"]
ENTRYPOINT ["/init"]

View File

@ -1,8 +1,11 @@
TAG=$(git describ)
TAG = $(shell git describe)
build:
docker build -t lxsameer/hephaestus:$(TAG) .
run:
docker run -d --name test -e PUID=1000 -e PGID=1000 -e TZ=Etc/UTC -e PUBLIC_KEY_DIR=$(PWD)/pub_keys/ -p 2222:22 -p 9000:9000 lxsameer/hephaestus:$(TAG)
push:
docker push lxsameer/hephaestus:$(TAG)

View File

@ -1,3 +1,4 @@
#!/command/execlineb -P
export GITWEB_PROJECTROOT=/repo
git-instaweb -b /bin/true -l
fdmove -c 2 1
cd /repo
exec sudo -u git git instaweb -b /bin/true -p 9000 -d python

View File

@ -1,7 +1,11 @@
User git
PIDFile /tor/tor.pid
DataDirectory /tor/
HiddenServiceDir /var/lib/tor/git/
HiddenServicePort 22 127.0.0.1:22
HiddenServiceAuthorizeClient stealth git
HiddenServiceVersion 3
HiddenServiceDir /var/lib/tor/gitweb/
HiddenServicePort 80 127.0.0.1:1234
HiddenServiceAuthorizeClient stealth gitweb
HiddenServicePort 80 127.0.0.1:9000
HiddenServiceVersion 3

View File

@ -0,0 +1,17 @@
#! /bin/bash
echo "Fix perms"
mkdir -p /repo
cd /repo || exit 1
chown git:git /repo
sudo -u git git init . --bare
mkdir -p /var/lib/tor/git
mkdir -p /var/lib/tor/gitweb && mkdir -p /tor
chown git:git /var/lib/tor/git/
chown git:git /var/lib/tor/gitweb/
chown git:git /tor/
chmod 0700 /var/lib/tor/git/
chmod 0700 /var/lib/tor/gitweb/
chmod 0700 /tor
tor --runasdaemon 0