-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static Build with Symfony Application - 404 for all routes #1334
Comments
Did you try running it manually from the temporary directory to see what the issue might be? |
@withinboredom I don't see how this should work. The temp directory is created from the static build itself and i can't run another instance of frankenphp in the same container without a different Caddyfile I've changed the static.Dockerfile to this FROM alpine:3.21
ARG APP_NAME=app
COPY dist/${APP_NAME} /usr/local/bin/app
ENV CADDY_ADMIN=0.0.0.0:2019
ENV FRANKENPHP_CONFIG="worker ./public/index.php"
ENTRYPOINT [ "/usr/local/bin/app" ]
CMD [ "php-server" ] This should reflect your comment since
|
I think the issue could also be the current working directory. It might be necessary to start the app from the directory it's in. Have you tried something like this?
|
Hi,
I think it must be a configuration issue but i don't see the reason. I've created a Symfony Application to test it with FrankenPHP. While it's working with the pre-build docker container, the static build is not working as expected. The application is embedded correctly, FrankenPHP untar it correctly, also the Caddyfile look good (it's the same i used for the "dynamic" build) but i get only 404. I've added the whole project here .
How to reproduce
git clone https://gitlab.com/ideaplexus/example-symfony-frankenphp.git cd example-symfony-frankenphp make build-static make run curl -v http://localhost:8000/greet/world
Result
Expected
The text was updated successfully, but these errors were encountered: