[Chore] Removed remaining docker assets (#1460)

This commit is contained in:
Alex Justesen
2024-06-05 17:26:39 -04:00
committed by GitHub
parent 97994e8521
commit ec478c2ad2
13 changed files with 0 additions and 187 deletions
-25
View File
@@ -1,25 +0,0 @@
/.git
/.github
/.idea
/.vscode
/docker/*
!/docker/deploy
/node_modules
/public/hot
/public/storage
/storage/*.key
/storage/logs
/vendor
_ide_helper.php
.editorconfig
.env
.env.backup
.phpstorm.meta.php
.phpunit.result.cache
auth.json
docker-compose.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
*.postman_collection.json
-44
View File
@@ -1,44 +0,0 @@
FROM serversideup/php:8.2-fpm-nginx-v2.2.1
# Add /config to allowed directory tree
ENV PHP_OPEN_BASEDIR=$WEBUSER_HOME:/config/:/dev/stdout:/tmp
# Enable mixed ssl mode so port 80 or 443 can be used
ENV SSL_MODE="mixed"
# Install addition packages and cron file
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cron \
htop \
php8.2-pgsql \
&& echo "MAILTO=\"\"\n* * * * * webuser /usr/bin/php /var/www/html/artisan schedule:run" > /etc/cron.d/laravel \
\
# Install Speedtest cli
&& curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash \
&& apt-get install -y --no-install-recommends speedtest \
\
# Clean up package lists
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
# Copy package configs
COPY --chmod=755 docker/deploy/etc /etc
# Copy app
COPY --chown=webuser:webgroup . $WEBUSER_HOME
WORKDIR $WEBUSER_HOME
# Install app dependencies
RUN composer install \
--no-interaction \
--prefer-dist \
--optimize-autoloader \
--no-dev \
--no-cache
# Add deprecated image file
RUN touch /var/www/html/storage/app/public/.deprecated_image
VOLUME /config
@@ -1,2 +0,0 @@
#!/command/with-contenv bash
s6-setuidgid root /usr/sbin/cron -f -l 8
@@ -1 +0,0 @@
longrun
@@ -1,2 +0,0 @@
runas-user
configure-ssl
@@ -1,2 +0,0 @@
#!/command/with-contenv bash
s6-setuidgid webuser php $WEBUSER_HOME/artisan queue:work --tries=3 --no-ansi -q
@@ -1 +0,0 @@
longrun
@@ -1,63 +0,0 @@
#!/command/with-contenv bash
# Exit on error
set -e
echo ""
echo "🐇 Configuring Speedtest Tracker..."
echo ""
# Fix permissions
echo "🔒 Fixing app path file permissions..."
chmod -R 755 /config
chown -R webuser:webgroup /config
chmod -R 755 $WEBUSER_HOME/storage
chown -R webuser:webgroup $WEBUSER_HOME/storage
echo "✅ Done."
echo ""
if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
# create symlinks
echo "🔗 Creating database symlink..."
symlinks=( \
/var/www/html/database/database.sqlite \
)
for i in "${symlinks[@]}"
do
if [[ -e "$i" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done
echo "✅ Done."
echo ""
fi
# Check for app key
if [ ! ${APP_KEY} ]; then
echo "⚠️ An application key is missing!"
echo "👀 To set an application key, read the docs: https://docs.speedtest-tracker.dev/"
fi
echo ""
# Refresh cache
echo "💰 Refreshing the cache..."
s6-setuidgid webuser php $WEBUSER_HOME/artisan filament:cache-components --no-ansi -q
s6-setuidgid webuser php $WEBUSER_HOME/artisan optimize --no-ansi -q
echo "✅ Done."
echo ""
# Migrate database
echo "🚛 Migrating the database..."
s6-setuidgid webuser php $WEBUSER_HOME/artisan migrate --force --no-ansi -q
echo "✅ Done."
echo ""
# App install done, show a message
echo "✅ All set, Speedtest Tracker has started!"
echo ""
@@ -1,47 +0,0 @@
#!/command/with-contenv bash
PUID=${PUID:-9999}
PGID=${PGID:-9999}
WEBUSER_HOME=${WEBUSER_HOME:-"/var/www/html"}
if [[ $PUID != 9999 || $PGID != 9999 ]]; then
# Change the group ID
groupmod -o -g "$PGID" webgroup
# Change the User ID
usermod -o -u "$PUID" webuser
# Make sure the home directory is updated with the proper UID & GID
chown webuser:webgroup $WEBUSER_HOME
fi
if [[ $S6_LOGGING != 1 ]]; then
echo '
--------------------------------------------------------------------
_______ __ __ __
| __|.-----.-----.-----.--| | |_.-----.-----.| |_
|__ || _ | -__| -__| _ | _| -__|__ --|| _|
|_______|| __|_____|_____|_____|____|_____|_____||____|
|__|
_______ __
|_ _|.----.---.-.----.| |--.-----.----.
| | | _| _ | __|| <| -__| _|
|___| |__| |___._|____||__|__|_____|__|
--------------------------------------------------------------------'
echo '
To support Speedtest Tracker visit:
https://github.com/alexjustesen/speedtest-tracker
-------------------------------------
GID/UID
-------------------------------------'
echo "
User uid: $(id -u webuser)
User gid: $(id -g webuser)
-------------------------------------
"
fi