Skip to content

Release: 'Saleor with Gunicorn'

Pre-release
Pre-release
Compare
Choose a tag to compare
@Chetabahana Chetabahana released this 15 Apr 10:00
· 969 commits to master since this release
4867007

DEPENDENCIES

Cygwin-Setup

Highlight notes on installation and using Cygwin:

  1. Consider to run it on different drive then C:\Windows via Symbolic link to C:\cygwin
  2. Create windows environment variables CYGWIN=winsymlinks:native to activate the NTFS symlinks
  3. To run Cygwin properly then you need to make sure that the dll's are always in the same base as Windows system. Incase fork() failures run rebase-trigger fullrebase, exit all programs and run Cygwin setup.
$ rebase-trigger fullrebase
Note: _autorebase will do a full rebase the next time setup is run.
  1. If the command doesn't work, exit Cygwin Terminal. Browse with explorer and click C:\cygwin\ash.exe then run /bin/rebaseall -v. Run Cygwin setup and reinstall dash. Open the terminal and repeat step 3.

REQUIREMENTS

$ python3 -m venv env
$ source env/bin/activate
(env)$ export PORT=80
(env)$ export DEBUG=True
(env)$ export SECRET_KEY=changeme
(env)$ export ALLOWED_HOSTS=localhost
(env)$ export CACHE_URL=redis://redis:6379/0
(env)$ export CELERY_BROKER_URL=redis://redis:6379/1
(env)$ export DATABASE_URL=postgres://saleor:saleor@localhost/saleor
(env)$ gunicorn -b :$PORT saleor.wsgi --timeout 120
  • Response from the gunicorn will be started like this
[2019-04-15 18:45:52 +0700] [331] [INFO] Starting gunicorn 19.9.0
[2019-04-15 18:45:52 +0700] [331] [INFO] Listening at: http://0.0.0.0:80 (331)
[2019-04-15 18:45:52 +0700] [331] [INFO] Using worker: sync
[2019-04-15 18:45:52 +0700] [334] [INFO] Booting worker with pid: 334
  • Point your browser to http://localhost/

screencapture-localhost-2019-04-15-19_16_15