Skip to content

Commit

Permalink
Fixed creation of custom entrypoint file for Docker services
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Oct 23, 2023
1 parent b868722 commit 13c55d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ RUN if [ -f "docker/php.ini" ]; then mv "docker/php.ini" "$PHP_INI_DIR/php.ini";
# https://symfony.com/doc/current/deployment.html / https://symfony.com/doc/current/setup/file_permissions.html
ARG VERSION
RUN if [ $VERSION = "8.2-apache" ]; then \
echo "/wait && mkdir -p var/cache var/log && /usr/local/bin/php ./bin/console cache:clear && \
echo "/wait && mkdir -p docker var/cache var/log && /usr/local/bin/php ./bin/console cache:clear && \
/usr/local/bin/php ./bin/console doctrine:database:create --no-interaction --if-not-exists && \
/usr/local/bin/php ./bin/console doctrine:schema:create --no-interaction && \
/usr/local/bin/php /app/bin/console app:udp-server 127.0.0.1:81 & \
apache2-foreground" >> docker/entrypoint.sh; \
else \
echo "/wait && mkdir -p var/cache var/log && /usr/local/bin/php ./bin/console cache:clear && \
echo "/wait && mkdir -p docker var/cache var/log && /usr/local/bin/php ./bin/console cache:clear && \
/usr/local/bin/php ./bin/console doctrine:database:create --no-interaction --if-not-exists && \
/usr/local/bin/php ./bin/console doctrine:schema:create --no-interaction && \
/usr/local/bin/php /app/bin/console app:udp-server 127.0.0.1:81 & \
php-fpm" >> docker/entrypoint.sh; \
fi

RUN mkdir docker && chmod +x docker/entrypoint.sh
RUN chmod +x docker/entrypoint.sh

CMD ["docker/entrypoint.sh"]

0 comments on commit 13c55d0

Please sign in to comment.