Skip to content
/ QFMS Public

💊 Quebec Family Medicine Symposium Website | Site Web du Symposium de Médecine Familiale du Québec

License

Notifications You must be signed in to change notification settings

eleyine/QFMS

Repository files navigation

😷 Quebec Family Medicine Symposium Website | Site Web du Symposium de Médecine Familiale du Québec

Branches

Installation

Requirements

  • pip - instructions here
  • virtualenvwrapper - instructions here
  • npm - instructions here

Quick setup

$ git clone [email protected]:eleyine/WearHacks-Website.git
$ cd WearHacks-Website
$ chmod u+x setup.sh
# The next two steps are optional but strongly recommended
$ mkvirtualenv wearhacks-website
$ workon wearhacks-website
(wearhacks-website) $ ./setup.sh

Note: setup.sh will copy example_private_settings.py to private.py. If you are on your local machine in dev mode, there's no need to edit it. However, if you'd like to deploy, please update smf_website/settings/private.py with your sensitive and deployment-specific settings.

Manual install: what's in setup.sh?

If you don't want to use setup.sh

$ mkvirtualenv wearhacks-website
$ workon wearhacks-website
(wearhacks-website) $ pip install -r requirements.txt
(wearhacks-website) $ bower install
(wearhacks-website) $ cp smf_website/settings/example_private_settings.py smf_website/settings/private.py
(wearhacks-website) $ python manage.py makemigrations
(wearhacks-website) $ python manage.py migrate
(wearhacks-website) $ python manage.py generate_registrations 3
(wearhacks-website) $ python manage.py runserver

Now, open http://127.0.0.1:8000/.

Usage

  • To run on localhost:

    $ workon wearhacks-website
    (wearhacks-website) $ python manage.py runserver
  • By default, you will use the Django settings defined in wearhacks_settings/settings/dev.py.

  • To use production settings defined in wearhacks_settings/settings/prod.py:

    (wearhacks-website) $ export APP_ENV=prod
    (wearhacks-website) $ python manage.py runserver
  • You can edit wearhacks_settings/settings/private.py to enter sensitive and user-specific settings. All settings in private.py will override those defined in dev.py and prod.py. See smf_website/settings/__init__.py for more information.

Stripe settings

The registration app handles payment via Stripe. To test this feature, edit in your Stripe API keys in your private settings files (smf_website/*private.py).

Deployment on Digital Ocean

I wrote a fabric script to automate installation on Digital Ocean droplets using the one-step Django installation. If you are deploying elsewhere, you can have an idea of the steps to take by inspecting server_files/fabfile.py.

Here are the setup instructions if you choose to do it with Digital Ocean.

  • Create a Digital Ocean droplet with a Django installation image

  • Ssh into your droplet to obtain the postgresql database password. It will be displayed in the welcome message.

  • Copy smf_website/settings/private.py to smf_website/settings/server_private.py and uncomment the postgresql settings. Edit in your postgresql password from the step above.

  • Make sure you have fabric installed locally. If you ran setup.sh, you already have it.

  • In smf_website/server_files/, copy fab_config_example.py and rename it to fab_config.py. Edit in in your deployment host address.

  • Then in server_files, run fab all

  • If you'd like a list of fab commands, run fab -l =======

About

💊 Quebec Family Medicine Symposium Website | Site Web du Symposium de Médecine Familiale du Québec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published