mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-11-06 18:12:36 +00:00
First working version, tests follow
This commit is contained in:
16
start.sh
16
start.sh
@@ -2,14 +2,14 @@
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
mkdir -p /run/gogs/tmp/uploads
|
||||
mkdir -p /run/gitea/tmp/uploads
|
||||
|
||||
setup_ldap_source() {
|
||||
set -eu
|
||||
|
||||
# Wait for gogs to finish db setup, before we insert ldap source in db
|
||||
# Wait for gitea to finish db setup, before we insert ldap source in db
|
||||
while ! curl --fail http://localhost:3000/healthcheck; do
|
||||
echo "Waiting for gogs to come up"
|
||||
echo "Waiting for gitea to come up"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -53,7 +53,7 @@ chmod 0644 /app/data/sshd/*.pub
|
||||
sed -e "s/^Port .*/Port ${SSH_PORT}/" \
|
||||
-e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \
|
||||
-e "s,^HostKey /etc/ssh/,HostKey /app/data/sshd/," \
|
||||
/etc/ssh/sshd_config > /run/gogs/sshd_config
|
||||
/etc/ssh/sshd_config > /run/gitea/sshd_config
|
||||
|
||||
sed -e "s/##DOMAIN/${APP_DOMAIN}/g" \
|
||||
-e "s/##SSH_PORT/${SSH_PORT}/g" \
|
||||
@@ -69,16 +69,16 @@ sed -e "s/##DOMAIN/${APP_DOMAIN}/g" \
|
||||
-e "s/##MAIL_SMTP_USERNAME/${MAIL_SMTP_USERNAME}/g" \
|
||||
-e "s/##MAIL_SMTP_PASSWORD/${MAIL_SMTP_PASSWORD}/g" \
|
||||
-e "s/##SECRET_KEY/$(pwgen -1 -s)/g" \
|
||||
/home/git/app.ini.template > "/run/gogs/app.ini"
|
||||
/home/git/app.ini.template > "/run/gitea/app.ini"
|
||||
|
||||
# merge any user config file
|
||||
[[ -f /app/data/app.ini ]] && cat "/app/data/app.ini" >> "/run/gogs/app.ini"
|
||||
[[ -f /app/data/app.ini ]] && cat "/app/data/app.ini" >> "/run/gitea/app.ini"
|
||||
|
||||
mkdir -p /app/data/repository /app/data/ssh
|
||||
|
||||
chown -R git:git /app/data /run/gogs
|
||||
chown -R git:git /app/data /run/gitea
|
||||
|
||||
( setup_ldap_source ) &
|
||||
|
||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gogs
|
||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea
|
||||
|
||||
|
||||
Reference in New Issue
Block a user