No description
Find a file
Oleg Lavrovsky 64a7ceb174 Dockerfile
2017-03-27 23:46:18 +02:00
bin Project name 2016-12-09 06:13:01 +01:00
docs Project name 2016-12-09 06:13:01 +01:00
publichealth Formspree'd contact form 2017-03-14 11:12:29 +01:00
tests Added basic test suite 2017-03-13 16:59:47 +01:00
vagrant Vagrant provisioning and README 2016-12-14 10:43:06 +01:00
.bowerrc Bootstrap SASS theme 2016-12-12 23:43:20 +01:00
.dockerfile Dockerfile 2017-03-27 23:46:18 +02:00
.editorconfig Bootstrap SASS theme 2016-12-12 23:43:20 +01:00
.gitignore Rebuilt CSS 2017-02-14 20:57:32 +01:00
bitbucket-pipelines.yml bitbucket-pipelines.yml added 2017-01-18 14:26:48 +00:00
bower.json Base template initial release 2017-01-27 17:06:53 +01:00
config.codekit3 design updates 2017-02-06 14:35:58 +01:00
docker-compose.yml Docker support 2017-03-27 17:05:55 +02:00
fabfile.py Project name 2016-12-09 06:13:01 +01:00
Gruntfile.js Improved responsive design 2017-01-18 12:13:36 +01:00
manage.py Project name 2016-12-09 06:13:01 +01:00
package.json Improved responsive design 2017-01-18 12:13:36 +01:00
Procfile Revert uwsgi 2017-03-27 22:55:07 +02:00
readme.md Python version 2017-03-27 23:32:32 +02:00
requirements-test.txt Added basic test suite 2017-03-13 16:59:47 +01:00
requirements.txt Revert uwsgi 2017-03-27 22:55:07 +02:00
runtime.txt Python version 2017-03-27 23:32:32 +02:00
stellar.yaml Project name 2016-12-09 06:13:01 +01:00
Vagrantfile Project name 2016-12-09 06:13:01 +01:00

Public Health Schweiz

Website of the Swiss Society for Public Health

Development environment

The easiest way to set up your machine would be to use Vagrant, then in the project folder in the terminal type:

vagrant liverun

Backend setup

After installing Python 3, from the project folder:

sudo apt-get install python3-venv python3-dev libjpeg-dev
pyvenv env
. env/bin/activate

pip install -U pip
pip install -r requirements.txt

./manage.py migrate
./manage.py createsuperuser

You will be asked a few questions to create an administrator account.

Frontend setup

Make sure a recent version of node.js is installed, then:

npm install -g bower grunt-cli
npm install
bower install

If you have one installed, also start your local redis server (service redis start).

Starting up

Run this after completing setup:

./manage.py runserver &
grunt browser-sync

A default browser should open pointing to the default home page.

Now access the admin panel with the user account you created earlier: http://localhost:3000/admin/

Troubleshooting

  • Issues with migrating database tables in SQLite during development? Try ./manage.py migrate --fake

Production notes

We are using Dokku for automated deployment.

sudo dokku apps:create phase-alpha
sudo dokku config:set phase-alpha BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-python