Commit 6fffa7d6 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed entrypoints

parent ac7a4ec3
......@@ -33,7 +33,8 @@ RUN apt update \
php7.4-redis \
php7.4-gd \
php7.4-json \
php7.4-opcache
php7.4-opcache \
php7.4-xdebug
# Install Composer
COPY ./helpers/installComposer.sh /usr/bin/installComposer
......@@ -88,7 +89,7 @@ RUN touch /run/nginx.pid && \
USER 1000:1000
WORKDIR /html
CMD /entrypoint.sh
CMD /html/helpers/entrypointDev.sh
FROM development AS production
......@@ -109,12 +110,10 @@ COPY config/nginx.conf /etc/nginx/nginx.conf
COPY config/nginx-default.conf /etc/nginx/sites-available/default
RUN sed -i 's/fastcgi_pass phpfpm:9000;/fastcgi_pass localhost:9000;/g' /etc/nginx/sites-available/default
# Install Entrypoint
COPY ./helpers/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY --chown=1000:1000 . /html
RUN chmod +x /html/helpers/*.sh
# Install packages
RUN --mount=type=secret,id=auto-devops-build-secrets . /run/secrets/auto-devops-build-secrets && \
chmod +x ./helpers/installPackages.sh && \
......@@ -123,11 +122,4 @@ RUN --mount=type=secret,id=auto-devops-build-secrets . /run/secrets/auto-devops-
USER 1000:1000
#CMD cp /root/.env .env && \
# sed -i 's/^REDIS_PASSWORD=.*/REDIS_PASSWORD=null/g' .env && \
# if [ "$GITLAB_ENVIRONMENT_NAME" = "production" ]; then sed -i 's/^APP_ENV=.*/APP_ENV=production/g' .env; else sed -i 's/^APP_ENV=.*/APP_ENV=development/g' .env; fi && \
# cp database/useragents.sqlite.example database/useragents.sqlite && \
# chown -R root:www-data storage/logs/metager bootstrap/cache && \
# chmod -R g+w storage/logs/metager bootstrap/cache && \
# cron -L /dev/stdout && \
# php artisan spam:load && \
# php-fpm7.4
......@@ -26,7 +26,6 @@ services:
image: metager/development:latest
volumes:
- .:/html
- ./helpers/entrypointDev.sh:/entrypoint.sh
nginx:
depends_on:
- "nodejs"
......
......@@ -35,6 +35,4 @@ if [ ! -d "/html/storage/logs/metager" ]; then
mkdir -p /html/storage/logs/metager
fi
php artisan optimize
php-fpm7.4 -F -R
\ No newline at end of file
php artisan optimize
\ No newline at end of file
#!/bin/sh
set -e
/bin/sh -c "/html/helpers/entrypoint.sh"
sed -i 's/^APP_ENV=.*/APP_ENV=local/g' .env;
......@@ -8,4 +10,6 @@ php artisan wait:db
rm /html/database/useragents.sqlite
touch /html/database/useragents.sqlite
php artisan migrate:fresh
php artisan db:seed
\ No newline at end of file
php artisan db:seed
php-fpm7.4 -F -R
\ No newline at end of file
#!/bin/sh
set -e
/bin/sh -c "/html/helpers/entrypoint.sh"
php artisan spam:load
php-fpm7.4 -F -R
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment