This project is archived, you might like to check how we used cookiecutter and how we set up the dev container.
Providing a simple, focussed marketplace for healthcare.. Check out the project's documentation.
You'll need Docker and ideally a recent python installation. Choose your poison 🐍
After you choose one of the two recommended ways to set up, we suggest that you mount the
pre-commit
hooks:pre-commit installBe a bit patient, this downloads some python packages -- trust us, this will supercharge ⚡ ⚡ your development experience!
Like most people, you'd like to keep the code on your machine and maybe just the DB inside docker. That works best.
- Set up a vitual environment using any manager of your choice (or simply
python -m venv .pyenv
) -- and activate it. - Install the deps:
pip install -r requirements.txt
- Copy
.env.example
to.env
(and ideally don't edit it).
docker-compose up -d postgres documentation
# to see logs/stdout attach a shell
docker logs -f <postgres-container-name> # or <documentation-container-name>
This will launch only the Postgres and documentation services inside docker.
The django app will load your .env
to pick the Postgres configuration. Run the
app:
python manage.py runserver
or generate and run migrations as usual 🎉
python manage.py migrate
Want to inspect the shell using psql
?
psql -U postgres -d development -h localhost -p 8002
- Set up a vitual environment using any manager of your choice (or simply
python -m venv .pyenv
). pip install -r requirements.txt
- Install Postgres 12 on your machine (lower versions may work absolutely fine and are untested).
- Copy the
.env.example
to.env
and edit it to suit your installation of Postgres. - Do your thing 🎉
You can do most development without setting up any python packages/environments on your local machine -- keeping the code and the DB inside docker.
docker-compose up -d
# to see logs/stdout attach a shell
docker logs -f web # or <postgres-container-name> or <documentation-container-name>
By default the docker container will watch for local changes you make using your editor and reload the server (typical django).
The only problem is running migrations, you'll have to resort to
docker-compose run --rm web "python migrate.py migrate"