Skip to content
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

Using ADD instead of volumes - Assets not found #46

Open
renan-taranto opened this issue Feb 15, 2017 · 9 comments
Open

Using ADD instead of volumes - Assets not found #46

renan-taranto opened this issue Feb 15, 2017 · 9 comments
Labels

Comments

@renan-taranto
Copy link

renan-taranto commented Feb 15, 2017

Hi.

I am trying to ADD the application files to the PHP container instead of mounting them.
The application files are added but while accessing it on the prod environment assets can not be found even after dumping them, fixing permissions errors and clearing the cache. Every request to an asset returns a 404 (Not Found), although they are in the container. It works fine in the dev environment tough. Maybe it is related to the nginx configurations but I don't really know.

So, what changes do I have to do in order to ADD instead of mounting volumes?

@maxpou
Copy link
Owner

maxpou commented Feb 17, 2017

Hi!
I just test assetics with volume. Everything works fine (I follow documentation).
But when we switch to ADD, I've the same problem. NGINX&PHP consider /js/fsajkfla.js as a PHP file.

I'll dig in this direction: http://symfony.com/doc/current/setup/web_server_configuration.html
Because my configuration is different from the Symfony one.

Stupid question, but why you don't want volume? It is for production mode?

@renan-taranto
Copy link
Author

Hi @maxpou.
Yeah its for production.

Thank you.

@renan-taranto
Copy link
Author

The Api Platform (https://github.com/api-platform/api-platform) has a great docker setup with nginx and php fpm that can be used as reference.
I wish I could help more but I'm still learning both docker and nginx.

@Miggianox94
Copy link

Hi, I have the same problem. When I use ADD or COPY instead of volumes (for production images) the assets return 404. Have you found a solution? Thanks.

@renan-taranto
Copy link
Author

Hi @Miggianox94 , take a look at https://github.com/renan-taranto/symfony-dddocker. It may help you somehow.

@Khaldoun488
Copy link

Hi @renan-taranto i am having also the same issue.
Did you find a solution ?

@renan-taranto
Copy link
Author

@Khaldoun488 I ended up not using this project boilerplate. Besides the resources I've already mentioned, this may help also: https://symfony.com/doc/current/setup/web_server_configuration.html#nginx

@Khaldoun488
Copy link

thanks

@Khaldoun488
Copy link

@renan-taranto are you using ECS for production ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants