- GID
depends_on:
- db
- command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- .:/home/patchwork/patchwork/
ports:
- GID
depends_on:
- db
- command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- .:/home/patchwork/patchwork/
ports:
.. code-block:: shell
- $ docker-compose run --rm web --shell
+ $ docker-compose run --rm web /bin/bash
To run ``django-manage`` commands, such as ``createsuperuser`` or ``migrate``,
run:
.. code-block:: shell
- $ docker-compose run --rm -web python manage.py dbrestore
+ $ docker-compose run --rm web python manage.py dbrestore
To run unit tests against the system Python packages, run:
COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
+CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
USER patchwork
WORKDIR /home/patchwork/patchwork
reset_data
fi
-# TODO(stephenfin): Deprecated the --test, --tox, --quick-test and --quick-tox
-# flags in a future release
if [ $# -eq 0 ]; then
# we probably ran with --reset and nothing else
# just exit cleanly
exit 0
-elif [ "$1" == "--shell" ]; then
- exec bash
-elif [ "$1" == "--test" ] || [ "$1" == "--quick-test" ]; then
- shift
- python manage.py test $@
-elif [ "$1" == "--tox" ] || [ "$1" == "--quick-tox" ]; then
- shift
- tox $@
-else # run whatever CMD is set to
- $@
fi
+
+exec "$@"