Skip to content

Commit

Permalink
Ease quickstart for developers
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed Sep 8, 2023
1 parent c50c7b1 commit 8fe3e1c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CHANGELOG

* Support django 4.2 and python 3.11
* Drop django 3.1 support
* Ease quickstart for developers


8.5.6 (2023-09-04)
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ RUN /code/venv/bin/pip install --no-cache-dir pip setuptools wheel -U
# Install dev requirements
RUN /code/venv/bin/pip3 install --no-cache-dir -e .[dev] -U

CMD ["/code/venv/bin/python3.8", "manage.py", "runserver", "0.0.0.0:8000"]
# Activate venv through entrypoint
COPY --chown=django:django docker/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["manage.py", "runserver", "0.0.0.0:8000"]
7 changes: 7 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Activate venv
. /code/venv/bin/activate

# exec
exec "$@"
7 changes: 5 additions & 2 deletions docs/development.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Development
===========

Follow installation procedure, and then install development packages::
Quickstart to run MapEntity in development :

$ pip install -r dev-requirements.txt
$ docker-compose build
$ docker-compose run --rm web ./manage.py migrate
$ docker-compose run --rm web ./manage.py createsuperuser
$ docker-compose up


Release
Expand Down

0 comments on commit 8fe3e1c

Please sign in to comment.