Skip to content

Commit

Permalink
Allow developers to edit files without restart
Browse files Browse the repository at this point in the history
In order to test updates to modified .py files in Django, the Docker container
must be restarted. This complicates development and makes it hard to quickly
test updates. Add in configuration that causes the server to reload
automatically on file edit so testing can be expedited.

This update requires a rebuild of the docker container via
docker-compose up --build.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
  • Loading branch information
fredlawl committed Jul 30, 2018
1 parent d41e6f1 commit f7943f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yml
Expand Up @@ -6,6 +6,7 @@ services:
ports:
- "5432:5432"
web:
restart: always
build: .
volumes:
- .:/code
Expand Down
3 changes: 2 additions & 1 deletion docker-entrypoint.sh
Expand Up @@ -16,7 +16,8 @@ exec gunicorn tagging_tracker.wsgi:application \
--workers 3 \
--log-level=debug \
--log-file=/code/logs/gunicorn.log \
--access-logfile=/code/logs/access.log &
--access-logfile=/code/logs/access.log \
--reload &

echo 'Starting nginx'
exec service nginx start

0 comments on commit f7943f6

Please sign in to comment.