The Prestashop installation is fully contained in a
store subfolder upon Heroku deployment. A
settings.inc.php resides in the root of the project, and uses several different environment variables to control behavior.
The assumption is that this installation runs behind a load balancer whose
X-Forwarded-Proto header value can be trusted; it is used to determine whether the request protocol is HTTPS or not.
If you have a Heroku account, you may simply use the following button to deploy this application:
After the deploy, in Heroku's Dashboard under "Settings" for your deployed application, remove the
PRESTASHOP_ADMIN_* environment variables.
Clone this repo:
$ git clone https://github.com/absalomedia/prestashop-12-factor $ cd prestashop-12-factor
If you like, you can locally install dependencies with Composer:
$ composer install
Create a new app and add add-ons for MySQL and E-Mail:
$ heroku create $ heroku addons:create jawsdb $ heroku addons:create sendgrid
$ git push heroku master
This will create tables and set up an admin user:
$ heroku run 'composer prestashop-db-core --name='Prestashop on Heroku' --domain=example.herokuapp.com --db_server=localhost --db_name=prestashop --db_user=admin --db_password=admin --firstname.lastname@example.org '
Navigate to the application's URL, or open your browser the lazy way:
$ heroku open
To update all dependencies:
$ composer update
settings.inc.php will use the following environment variables (if multiple are listed, in order of precedence):
mysql://user:pass@host:port/dbname) for database connections.
SENDGRID_PASSWORD for SendGrid credentials.