diff --git a/Dockerfile-debian-bookworm b/Dockerfile-debian-bookworm index d68c174d761f30b26db744c6e795b58dad9328b0..446a27f0c2b178dbcf3b9f9090790943155f7ef8 100644 --- a/Dockerfile-debian-bookworm +++ b/Dockerfile-debian-bookworm @@ -2,12 +2,22 @@ # docker build --tag sfconservancy.org-bookworm --file Dockerfile-debian-bookworm . # # To run the website, first ensure you have a -# "conservancy/djangocommonsettings.py" file, with an appropriate database path. Then run: +# "conservancy/djangocommonsettings.py" file, with an appropriate database path. # -# run --tty --interactive --rm=true --publish=8000:8000 \ +# [FIRST RUN ONLY] If you don't have an existing copy of the database, run: +# touch conservancy-website.sqlite3 +# +# Start the application with: +# docker run --tty --interactive --rm=true --publish=8000:8000 \ # --mount type=bind,source=$(pwd),target=/var/www/website \ # --mount type=bind,source=$(pwd)/conservancy-website.sqlite3,target=/var/lib/www/database/conservancy-website.sqlite3 \ # sfconservancy.org-bookworm:latest +# +# [FIRST RUN ONLY] In a separate terminal, run `docker ps` noting "CONTAINER ID". +# Then run the database migrations with: +# docker exec -it [CONTAINER ID] /usr/bin/python3 manage.py migrate +# +# Visit the site at http://127.0.0.1:8000 ARG DEBIAN_FRONTEND=noninteractive