Compare commits

...

2 Commits

Author SHA1 Message Date
Sameer Rahmani af92a65229
Final changes before moving to cgit 2023-07-16 22:27:57 +01:00
Sameer Rahmani 7acbd71876
Initial setup 2023-07-16 18:51:21 +01:00
6 changed files with 55 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM lscr.io/linuxserver/openssh-server:latest
ENV USER_NAME=git
RUN apk add --no-cache --upgrade git lighttpd tor git-gitweb python3
COPY /root/ /
CMD ["/bin/bash", "/usr/local/bin/run-tor.sh"]#["tor", "--runasdaemon", "0"]
ENTRYPOINT ["/init"]

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
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)
all: build push

View File

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

View File

@ -0,0 +1 @@
longrun

11
root/etc/tor/torrc Normal file
View File

@ -0,0 +1,11 @@
User git
PIDFile /tor/tor.pid
DataDirectory /tor/
HiddenServiceDir /var/lib/tor/git/
HiddenServicePort 22 127.0.0.1:22
HiddenServiceVersion 3
HiddenServiceDir /var/lib/tor/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