mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2026-02-09 14:14:13 +09:00
modify development branch to include an IDE and be self contained
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# make our folders
|
||||
mkdir -p \
|
||||
/config/www/{backgrounds,icons,avatars,SupportedApps} \
|
||||
/var/www/localhost/heimdall \
|
||||
/config/log/heimdall
|
||||
|
||||
# install heimdall if necessary
|
||||
[[ -f /heimdall/heimdall.tar.gz ]] && \
|
||||
echo "New container detected, installing Heimdall" && \
|
||||
tar xf \
|
||||
/heimdall/heimdall.tar.gz -C \
|
||||
/var/www/localhost/heimdall --strip-components=1 && \
|
||||
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
rm -rf /heimdall && \
|
||||
chown -R abc:abc /var/www/localhost/heimdall
|
||||
|
||||
# create symlinks
|
||||
|
||||
symlinks=( \
|
||||
/var/www/localhost/heimdall/storage/app/public/avatars \
|
||||
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
||||
/var/www/localhost/heimdall/storage/app/public/icons \
|
||||
/var/www/localhost/heimdall/app/SupportedApps \
|
||||
/var/www/localhost/heimdall/database/app.sqlite \
|
||||
/var/www/localhost/heimdall/.env )
|
||||
|
||||
for i in "${symlinks[@]}"
|
||||
do
|
||||
[[ -e "$i" && ! -L "$i" ]] && rm -rf "$i"
|
||||
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
|
||||
done
|
||||
|
||||
[[ -e "/var/www/localhost/heimdall/storage/logs/laravel.log" && ! -L "/var/www/localhost/heimdall/storage/logs/laravel.log" ]] \
|
||||
&& rm -rf "/var/www/localhost/heimdall/storage/logs/laravel.log"
|
||||
[[ ! -L "/var/www/localhost/heimdall/storage/logs/laravel.log" ]] && \
|
||||
ln -s "/config/log/heimdall/laravel.log" "/var/www/localhost/heimdall/storage/logs/laravel.log"
|
||||
|
||||
# copy .env if not exists
|
||||
[[ ! -f /config/www/.env ]] && \
|
||||
cp /var/www/localhost/heimdall/.env.example /config/www/.env && \
|
||||
echo "generating app key"
|
||||
php /var/www/localhost/heimdall/artisan key:generate
|
||||
# set queue driver to database
|
||||
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
/var/www/localhost/heimdall
|
||||
@@ -1,9 +0,0 @@
|
||||
/config/log/heimdall/laravel.log {
|
||||
size 5M
|
||||
rotate 5
|
||||
compress
|
||||
nodateext
|
||||
notifempty
|
||||
missingok
|
||||
su abc abc
|
||||
}
|
||||
6
root/etc/services.d/cloud9/run
Normal file
6
root/etc/services.d/cloud9/run
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
cd /c9sdk
|
||||
HOME=/c9bins exec \
|
||||
s6-setuidgid abc \
|
||||
/c9bins/.c9/node/bin/node server.js --listen 0.0.0.0 -p 8000 -w /var/www/localhost/heimdall -a :
|
||||
Reference in New Issue
Block a user