Update gitea and remove rust (fake)
This commit is contained in:
parent
5cdb3e5c40
commit
e06e93736a
7 changed files with 30 additions and 81 deletions
|
@ -1,40 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ -z $ROOTFS ] && ROOTFS=/tmp/gitea
|
||||
[ -z $ALPINE_VERSION ] && ALPINE_VERSION=3.10
|
||||
[ -z $ALPINE_RELEASE ] && ALPINE_RELEASE=0
|
||||
|
||||
ALPINE_TARBALL=alpine-minirootfs-$ALPINE_VERSION.$ALPINE_RELEASE-x86_64.tar.gz
|
||||
|
||||
[ -f $ROOTFS.raw ] && sudo rm $ROOTFS.raw
|
||||
[ -f $ROOTFS.raw ] && rm $ROOTFS.raw
|
||||
[ -f $ALPINE_TARBALL ] || wget http://dl-cdn.alpinelinux.org/alpine/v$ALPINE_VERSION/releases/x86_64/$ALPINE_TARBALL
|
||||
|
||||
sudo systemctl stop gitea.service && sudo portablectl detach gitea
|
||||
(sudo systemctl stop gitea.service && sudo portablectl detach gitea) || echo "Image not attached."
|
||||
|
||||
sudo mkdir -p $ROOTFS
|
||||
sudo tar xf $ALPINE_TARBALL -C $ROOTFS/
|
||||
mkdir -p $ROOTFS
|
||||
tar xf $ALPINE_TARBALL -C $ROOTFS/
|
||||
|
||||
sudo mkdir -p \
|
||||
chmod 755 $ROOTFS
|
||||
|
||||
mkdir -p \
|
||||
$ROOTFS/etc/systemd/system \
|
||||
$ROOTFS/var/{lib,run,tmp} \
|
||||
$ROOTFS/{dev,tmp,proc,root,run,sys} \
|
||||
$ROOTFS/etc/gitea \
|
||||
$ROOTFS/var/lib/gitea \
|
||||
$ROOTFS/dev/log \
|
||||
$ROOTFS/run/systemd/journal \
|
||||
$ROOTFS/run/{dbus,gitea} \
|
||||
$ROOTFS/{proc,sys,dev} \
|
||||
$ROOTFS/var/tmp/ \
|
||||
$ROOTFS/run/gitea \
|
||||
$ROOTFS/root/.ssh
|
||||
|
||||
sudo touch $ROOTFS/etc/machine-id $ROOTFS/etc/resolv.conf
|
||||
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 --no-cache gitea openssh-keygen
|
||||
# sudo systemd-nspawn --directory $ROOTFS/ /bin/rm -rf /etc/apk /root/.cache /root/.config /var/cache/*
|
||||
sudo systemd-nspawn --directory $ROOTFS/ /bin/rm -rf /etc/apk/* /var/cache/*
|
||||
|
||||
sudo cp systemd/* $ROOTFS/etc/systemd/system/
|
||||
cp systemd/* $ROOTFS/etc/systemd/system/
|
||||
|
||||
sudo mksquashfs $ROOTFS/ $ROOTFS.raw -all-root -noappend
|
||||
#sudo rm -rf $ROOTFS
|
||||
rm -f $ROOTFS.raw
|
||||
mksquashfs $ROOTFS/ $ROOTFS.raw -all-root -noappend
|
||||
sudo portablectl attach $ROOTFS.raw
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
[Unit]
|
||||
Description=Gitea (Git with a cup of tea)
|
||||
After=network.target
|
||||
#Requires=sshd.socket
|
||||
|
||||
#Requires=mysql.service
|
||||
#Requires=mariadb.service
|
||||
#Requires=postgresql.service
|
||||
|
@ -8,17 +10,13 @@ After=network.target
|
|||
#Requires=redis.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=gitea
|
||||
User=git
|
||||
Group=www-data
|
||||
|
||||
Environment=USER=gitea HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea
|
||||
WorkingDirectory=/var/lib/gitea
|
||||
Environment=USER=git HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea
|
||||
|
||||
ExecStart=/bin/ls -al /etc/gitea/
|
||||
#ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
|
||||
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
|
||||
|
||||
RuntimeDirectory=gitea
|
||||
StateDirectory=gitea
|
||||
ConfigurationDirectory=gitea
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue