Gitea
This commit is contained in:
parent
9b716baf78
commit
5cdb3e5c40
14 changed files with 341 additions and 6 deletions
23
alpine/rust/build.sh
Normal file
23
alpine/rust/build.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
ROOTFS=/tmp/cgit
|
||||
ALPINE_TARBALL=alpine-minirootfs-3.9.2-x86_64.tar.gz
|
||||
|
||||
# wget http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/$ALPINE_TARBALL
|
||||
|
||||
mkdir -p $ROOTFS
|
||||
tar xf $ALPINE_TARBALL -C $ROOTFS/ \
|
||||
./etc/apk ./etc/os-release ./usr ./lib ./bin ./sbin ./var
|
||||
|
||||
mkdir -p $ROOTFS/etc/systemd/system \
|
||||
$ROOTFS/var/{lib,run,tmp} \
|
||||
$ROOTFS/{dev,tmp,proc,root,run,sys} \
|
||||
$ROOTFS/etc/git \
|
||||
$ROOTFS/var/lib/git
|
||||
touch $ROOTFS/etc/machine-id $ROOTFS/etc/resolv.conf
|
||||
|
||||
sudo systemd-nspawn --directory $ROOTFS/ /sbin/apk update
|
||||
sudo systemd-nspawn --directory $ROOTFS/ /sbin/apk add cgit uwsgi-cgi
|
||||
cp systemd/* $ROOTFS/etc/systemd/system/
|
||||
|
||||
mksquashfs $ROOTFS/ $ROOTFS.raw
|
12
alpine/rust/systemd/cgit.service
Normal file
12
alpine/rust/systemd/cgit.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=cgit uwsgi service
|
||||
After=network.target
|
||||
Before=nginx.service
|
||||
Requires=cgit.socket
|
||||
|
||||
[Service]
|
||||
DynamicUser=yes
|
||||
User=git
|
||||
Group=git
|
||||
RuntimeDirectory=git
|
||||
ConfigurationDirectory=git
|
10
alpine/rust/systemd/cgit.socket
Normal file
10
alpine/rust/systemd/cgit.socket
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=cgit socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/git/cgit.sock
|
||||
SocketMode=0660
|
||||
SocketGroup=http
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
Loading…
Add table
Add a link
Reference in a new issue