Compare commits

..

No commits in common. "43f19810a14fdcd929826117818acba420370a67" and "b9277f2e7460c685ed74a02cf148e65afdfc73e4" have entirely different histories.

2 changed files with 90 additions and 96 deletions

View File

@ -1,94 +1,90 @@
#!/usr/bin/bash #!/usr/bin/bash
#---------------------------------------------------------------------- #----------------------------------------------------------------------
cd $(dirname $0) cd $(dirname $0)
PATH=$PATH:$(dirname "$(pwd)") PATH=$PATH:$(dirname "$(pwd)")
#---------------------------------------------------------------------- #----------------------------------------------------------------------
source ../.pct-helpers source ../.pct-helpers
#---------------------------------------------------------------------- #----------------------------------------------------------------------
readConfig readConfig
#---------------------------------------------------------------------- #----------------------------------------------------------------------
webAppConfig gitea webAppConfig gitea
DFL_ID=${DFL_ID:=300} DFL_ID=${DFL_ID:=300}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=gitea} DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=gitea}
DFL_CORES=${DFL_CORES:=2} DFL_CORES=${DFL_CORES:=2}
DFL_RAM=${DFL_RAM:=1024} DFL_RAM=${DFL_RAM:=1024}
DFL_SWAP=${DFL_SWAP:=${DFL_RAM}} DFL_SWAP=${DFL_SWAP:=${DFL_RAM}}
DFL_DRIVE=${DFL_DRIVE:=40} DFL_DRIVE=${DFL_DRIVE:=40}
WAN_IP=SKIP WAN_IP=SKIP
WAN_GATE=SKIP WAN_GATE=SKIP
ADMIN_IP=SKIP ADMIN_IP=SKIP
ADMIN_GATE=SKIP ADMIN_GATE=SKIP
LAN_IP=SKIP LAN_IP=SKIP
LAN_GATE=SKIP LAN_GATE=SKIP
REBOOT=${REBOOT:=1} REBOOT=${REBOOT:=1}
readVars readVars
#---------------------------------------------------------------------- #----------------------------------------------------------------------
INTERFACES=( INTERFACES=(
"name=lan,bridge=vmbr${LAN_BRIDGE},firewall=1,ip=dhcp,type=veth" "name=lan,bridge=vmbr${LAN_BRIDGE},firewall=1,ip=dhcp,type=veth"
) )
OPTS_STAGE_2="\ OPTS_STAGE_2="\
--onboot 1 \ --onboot 1 \
" "
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# XXX do a version using alpune...
# see: echo "# Building config..."
# https://wiki.alpinelinux.org/wiki/Gitea buildAssets
#
echo "# Creating CT..."
echo "# Building config..." pctCreateTurnkey 'gitea' $ID "$PASS"
buildAssets
echo "# Starting TKL UI..."
echo "# Creating CT..." @ lxc-attach $ID -- bash -c "HUB_APIKEY=SKIP SEC_UPDATES=SKIP /usr/sbin/turnkey-init"
pctCreateTurnkey 'gitea' $ID "$PASS"
echo "# Copying assets..."
echo "# Starting TKL UI..." pctPushAssets $ID
@ lxc-attach $ID -- bash -c "HUB_APIKEY=SKIP SEC_UPDATES=SKIP /usr/sbin/turnkey-init"
echo "# Disabling fail2ban..."
echo "# Copying assets..." # NOTE: we do not need this as we'll be running from behind a reverse proxy...
pctPushAssets $ID @ lxc-attach $ID systemctl stop fail2ban
@ lxc-attach $ID systemctl disable fail2ban
echo "# Disabling fail2ban..."
# NOTE: we do not need this as we'll be running from behind a reverse proxy... echo "# Updating system..."
@ lxc-attach $ID systemctl stop fail2ban pctUpdateTurnkey $ID
@ lxc-attach $ID systemctl disable fail2ban
echo "# Post config..."
echo "# Updating system..." pctSet $ID "${OPTS_STAGE_2}" $REBOOT
pctUpdateTurnkey $ID pctSetNotes $ID
echo "# Post config..." saveLastRunConfig
pctSet $ID "${OPTS_STAGE_2}" $REBOOT
pctSetNotes $ID echo "# Traefik config..."
traefikPushConfig
saveLastRunConfig
showNotes
echo "# Traefik config..." echo "# Done."
traefikPushConfig
showNotes
echo "# Done." #----------------------------------------------------------------------
# vim:set ts=4 sw=4 :
#----------------------------------------------------------------------
# vim:set ts=4 sw=4 :

View File

@ -155,8 +155,6 @@ pctPushAssets $ID
# Colabora... # Colabora...
# XXX should this be a function/script, callable separately, usefull to # XXX should this be a function/script, callable separately, usefull to
# update existing installations??? # update existing installations???
# XXX can we make the backup/restore/migrate scripts generic and simply adapt
# them for running in lxc, over ssh or locally???
if ! [ -z $COLLABORA_OFFICE ] ; then if ! [ -z $COLLABORA_OFFICE ] ; then
echo "# Collabora office..." echo "# Collabora office..."
# see: # see: