use all those scripts in order to split code
This commit is contained in:
@@ -17,16 +17,9 @@ RUN if [ ${USER_ID:-0} -ne 0 ] && [ ${GROUP_ID:-0} -ne 0 ]; then \
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY scripts/init-dev.sh /usr/local/bin/init-dev.sh
|
||||
COPY scripts/init-prod.sh /usr/local/bin/init-prod.sh
|
||||
COPY scripts/wait-mariadb.sh /usr/local/bin/wait-mariadb.sh
|
||||
COPY scripts/wait-typesense.sh /usr/local/bin/wait-typesense.sh
|
||||
COPY scripts/*.sh /usr/local/bin/
|
||||
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh \
|
||||
/usr/local/bin/init-dev.sh \
|
||||
/usr/local/bin/init-prod.sh \
|
||||
/usr/local/bin/wait-mariadb.sh \
|
||||
/usr/local/bin/wait-typesense.sh
|
||||
RUN chmod +x /usr/local/bin/*.sh
|
||||
|
||||
WORKDIR /var/www/app
|
||||
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
. /usr/local/bin/context.sh
|
||||
. /usr/local/bin/setup_git.sh
|
||||
. /usr/local/bin/setup_composer.sh
|
||||
. /usr/local/bin/setup_env.sh
|
||||
. /usr/local/bin/setup_laravel.sh
|
||||
|
||||
if [ "$DEV" = 1 ]; then
|
||||
/usr/local/bin/init-dev.sh
|
||||
else
|
||||
/usr/local/bin/init-prod.sh
|
||||
fi
|
||||
echo "[INIT] Starting initialization..."
|
||||
|
||||
setup_git
|
||||
setup_composer
|
||||
setup_env
|
||||
|
||||
/usr/local/bin/wait-mariadb.sh
|
||||
/usr/local/bin/wait-typesense.sh
|
||||
|
||||
setup_laravel
|
||||
|
||||
echo "[INIT] Done ✅"
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user