Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sethsandaru committed Feb 6, 2024
1 parent f97884f commit 3d99308
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ COPY ./.docker/docking-worker.conf /etc/supervisor/conf.d/
COPY ./.docker/docking-host.conf /etc/nginx/conf.d/default.conf

RUN cp .docker/entrypoint.sh /entrypoint
RUN chmod +x /entrypoint

# The bundle already built, no need to keep this to save size
RUN rm -rf ./node_modules
Expand Down
9 changes: 2 additions & 7 deletions .docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ for f in /var/www/html/.docker/scripts/*.sh; do
# Bail out this loop if any script exits with non-zero status code
bash "$f" || break
done
chown -R www-data:www-data /var/www/html

if [ $# -gt 0 ]; then
# If we passed a command, run it as root
exec "$@"
else
exec /usr/bin/supervisord -n
fi
echo "Starting the application using supervisor...";
exec /usr/bin/supervisord --nodaemon
14 changes: 11 additions & 3 deletions .docker/scripts/caches.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/env bash

/usr/bin/php /var/www/html/artisan config:cache --no-ansi -q
/usr/bin/php /var/www/html/artisan route:cache --no-ansi -q
/usr/bin/php /var/www/html/artisan view:cache --no-ansi -q
echo "Running config:cache...";
php /var/www/html/artisan config:cache --no-ansi -q
echo "Successfully cached the configuration";

echo "Running route:cache...";
php /var/www/html/artisan route:cache --no-ansi -q
echo "Successfully cached the routes";

echo "Running view:cache...";
php /var/www/html/artisan view:cache --no-ansi -q
echo "Successfully cached the views";
4 changes: 3 additions & 1 deletion .docker/scripts/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

/usr/bin/php /var/www/html/artisan migrate --force
echo "Running migration...";
php /var/www/html/artisan migrate --no-ansi -q --force
echo "Successfully migrated";

0 comments on commit 3d99308

Please sign in to comment.