diff options
author | Artur Smęt <artur.smet@mirumee.com> | 2016-01-05 15:06:32 +0100 |
---|---|---|
committer | Artur Smęt <artur.smet@mirumee.com> | 2016-01-08 11:49:10 +0100 |
commit | 50fd7ec674ce5eb6bb5f0eaaf98811b2861892b5 (patch) | |
tree | 3804f383fa3a95a5093db80bf7651a81296088dd /docs/deploy.rst | |
parent | bf8f4c184fd10f80114b0b3d197a1edac3af2413 (diff) | |
download | saleor-frontend-50fd7ec674ce5eb6bb5f0eaaf98811b2861892b5.tar.gz saleor-frontend-50fd7ec674ce5eb6bb5f0eaaf98811b2861892b5.tar.bz2 saleor-frontend-50fd7ec674ce5eb6bb5f0eaaf98811b2861892b5.zip |
Add Deployments docs
Diffstat (limited to 'docs/deploy.rst')
-rw-r--r-- | docs/deploy.rst | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/docs/deploy.rst b/docs/deploy.rst new file mode 100644 index 00000000..1420f73a --- /dev/null +++ b/docs/deploy.rst @@ -0,0 +1,81 @@ +Deployment +========== + +Docker +------ + + +Local prerequisites +******************* + +You will need to install Docker and +`docker-compose <https://docs.docker.com/compose/install/>`__ before +performing the following steps. + +Usage +***** + +1. Build ``Saleor`` with ``docker-compose`` + + .. code:: + + $ docker-compose build + +2. Prepare the database + + .. code:: + + $ docker-compose run web python manage.py migrate + $ docker-compose run web python manage.py populatedb --createsuperuser + + The ``--createsuperuser`` switch creates an admin account for + ``admin@example.com`` with the password set to ``admin``. + +3. Install front-end dependencies + + .. code:: + + $ docker-compose run web npm install + $ docker-compose run web grunt + +4. Run ``Saleor`` + + .. code:: + + $ docker-compose up + +By default, the application is configured to listen on port ``8000``. + + +Heroku +------ + +First steps +*********** + +.. code:: + + $ heroku create --buildpack https://github.com/ddollar/heroku-buildpack-multi.git + $ heroku addons:add heroku-postgresql + $ heroku addons:add heroku-redis + $ heroku config:set SECRET_KEY='<your secret key here>' + $ heroku config:set ALLOWED_HOSTS='<your hosts here>' + + +.. note:: + Heroku's storage is volatile. This means that all instances of your application will have separate disks and will lose all changes made to the local disk each time the application is restarted. The best approach is to use cloud storage such as [[Amazon S3|Storage: Amazon S3]]. + +Deploy +****** + +.. code:: + + $ git push heroku master + + +Prepare the database +******************** + +.. code:: + + $ heroku run python manage.py migrate |