dockerized #1

Merged
e merged 8 commits from dockerized into main 2024-08-02 01:01:08 +00:00
Showing only changes of commit b35c19e388 - Show all commits

20
gitea
View File

@ -153,6 +153,25 @@ EOL"
echo "Configuring SSL with Certbot..."
incus exec $CONTAINER_NAME -- certbot --nginx -d $DOMAIN_NAME --non-interactive --agree-tos --email admin@$DOMAIN_NAME
echo "Copying custom files to Gitea data directory..."
incus exec $CONTAINER_NAME -- bash -c "
mkdir -p /var/lib/gitea/templates
mkdir -p /var/lib/gitea/public/assets/img
"
incus file push custom/templates/* ${CONTAINER_NAME}/var/lib/gitea/templates/
incus file push custom/public/assets/img/* ${CONTAINER_NAME}/var/lib/gitea/public/assets/img/
echo "Setting correct permissions for custom files..."
incus exec $CONTAINER_NAME -- bash -c "
chown -R 1000:1000 /var/lib/gitea/templates
chown -R 1000:1000 /var/lib/gitea/public
chmod -R 755 /var/lib/gitea/templates
chmod -R 755 /var/lib/gitea/public
"
echo "Restarting Gitea to apply custom files..."
incus exec $CONTAINER_NAME -- docker-compose -f /root/docker-compose.yml restart server
CONTAINER_IP=$(incus exec $CONTAINER_NAME -- ip addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
echo "Gitea setup complete!"
@ -228,4 +247,3 @@ case "$1" in
esac
exit 0