Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/symfony8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM dunglas/frankenphp:1-php8.5-alpine

RUN apk add --no-cache git unzip bash sqlite
RUN install-php-extensions intl zip pdo_sqlite
RUN install-php-extensions intl zip pdo_mysql

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN git config --global --add safe.directory /app && \
Expand Down
15 changes: 14 additions & 1 deletion demo/symfony8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,20 @@ cache-clear: ensure-up
$(DOCKER_COMPOSE) exec php php bin/console cache:clear

link-bundle: ensure-up
$(DOCKER_COMPOSE) exec php sh -c "mkdir -p var/data && rm -rf vendor/nowo-tech/http-log-bundle && ln -sf /var/http-log-bundle vendor/nowo-tech/http-log-bundle && php bin/console doctrine:schema:update --force --complete && php bin/console cache:clear"
@echo "Waiting for MySQL from PHP container..."
@i=0; \
while [ $$i -lt 30 ]; do \
if $(DOCKER_COMPOSE) exec php sh -c "mkdir -p var/data && rm -rf vendor/nowo-tech/http-log-bundle && ln -sf /var/http-log-bundle vendor/nowo-tech/http-log-bundle && php bin/console doctrine:schema:update --force --complete && php bin/console cache:clear" 2>/dev/null; then \
break; \
fi; \
i=$$((i+1)); \
sleep 2; \
done; \
if [ $$i -ge 30 ]; then \
echo "MySQL not reachable from demo PHP container"; \
$(DOCKER_COMPOSE) logs --tail=50 database php || true; \
exit 1; \
fi

update: ensure-up
$(DOCKER_COMPOSE) exec -T -e COMPOSER_MEMORY_LIMIT=-1 php composer update --no-interaction
Expand Down
Loading