I want to switch to production mode but I can not find information about the exact commands that I have to use. I know that I must use this command:
php bin/magento deploy:mode:set production
But, do I need to make some change of permission for the folders? Do I need to execute some more command before or after using the command to change to production mode?
UPDATE
These are the commands I use to give permissions to my Magento files and folders:
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data .
chmod u+x bin/magento