Closed vaishaliwebkul closed 4 years ago
How can I go to the prod version?
@alessioluciano., You can simply switch to production mode by changing APP_ENV=prod in .env file which is in root directory of project. After that run following command to clear the cache: php bin/console c:c
I did that but then I got this error by wanting to clear cache:
do you have an idea?
@alessioluciano We have already fixed this issue https://github.com/uvdesk/core-framework/issues/200 in prod mode(your code is not updated so you are facing this issue.)
so we recommend that create your project again as there are many new features and changes done from our end.
Where do I have to download it updated? Because I downloaded it from https://s3-ap-southeast-1.amazonaws.com/cdn.uvdesk.com/uvdesk/downloads/opensource/uvdesk_community_01_development_php_72.zip and also with the command composer create-project uvdesk/community-skeleton helpdesk-project --stability dev but I get the same version as before. Can you help?
@alessioluciano
We have resolve this issue with same version. so run this command:
composer create-project uvdesk/community-skeleton helpdesk-project --stability
and your issue will be resolve.
Check this:
@alessioluciano use this command dev at end: composer create-project uvdesk/community-skeleton helpdesk-project --stability dev
Perfect, now i have the new version, but when i changed the version in the .env file, and when i want to run the server with:
php bin/console server:run
I have this error:
@alessioluciano php bin/console server:run command is use only when you are using your project in dev mode.
If you want to run your project in production environment you have to access public directory of your project. i.e yourHost/yourProject/public
@alessioluciano php bin/console server:run command is use only when you are using your project in dev mode.
If you want to run your project in production environment you have to access public directory of your project. i.e yourHost/yourProject/public
everything works for me in debug but in production APP_ENV=prod
write the command
php bin/console server:run
in systemctl but show me:
There are no commands defined in the "server" namespace.
can you provide me how to deploy it to production? sorry can't find docs for that
@m4ary
to deploy project in production mode, just hit project's root directory path in the browser in the way yourHost/Project_name/public.
@m4ary php bin/console server:run works only when you are running your project in dev mode i.e APP_ENV=dev once you change it to APP_ENV=prod in .env file of your project you will see this message. "There are no commands defined in the "server" namespace".
It means now your project in production mode, you will not able to run your project using command as it is only for development environment.
Now you need to run your project in this way (need to navigate to your project public path ): Your_Host/Project_Name/public
This error should be shown as :
Errors page (for ex: page not found, session out , No route found ) should be shown by proper indentation in production mode like below as by showing in dev_mode all the files are showing to user whether customer or agent which is insecure.