You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docker/.env.prototype
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
RUNESTONE_HOST=localhost
8
8
9
9
# Select a configuration for the instructor-facing server (the Runestone server) and the student-facing server (BookServer). Valid values are ``test``, ``development``, and ``production``.
10
-
SERVER_CONFIG=development
10
+
SERVER_CONFIG=${SERVER_CONFIG}
11
11
12
12
# For production, change the credentials for the DB to something more secure.
13
13
# This should be done prior to first running ``docker/docker_tools.py up``.
@@ -21,9 +21,9 @@ POSTGRES_HOST=db
21
21
#
22
22
# An admin password is required to log in to the admin interface when using HTTPS.
23
23
WEB2PY_ADMIN_PASSWORD=your_password_here
24
-
# To generate a new salt value, run ``cd $WEB2PY_PATH; python -c "from gluon.utils import web2py_uuid; print(f'sha512:{web2py_uuid()}')"`` in Docker, then paste the displayed value here. (Adapted from web2py's ``Auth.get_or_create_key`` in ``gluon/tools.py``; see also `web2py authentication <http://web2py.com/books/default/chapter/29/09/access-control#Authentication>`_.)
24
+
# You **must** generate a new salt value; the value here IS NOT SECURE. To generate a new salt value, run ``cd $WEB2PY_PATH; python -c "from gluon.utils import web2py_uuid; print(f'sha512:{web2py_uuid()}')"`` in Docker, then paste the displayed value here. (Adapted from web2py's ``Auth.get_or_create_key`` in ``gluon/tools.py``; see also `web2py authentication <http://web2py.com/books/default/chapter/29/09/access-control#Authentication>`_.)
# To generate a new secret, run ``python -c "import secrets; print(secrets.token_urlsafe(16))"``.
26
+
# You **must** generate a new secret; the value here IS NOT SECURE. To generate a new secret, run ``python -c "import secrets; print(secrets.token_urlsafe(16))"``.
27
27
JWT_SECRET=WT2epQY9p_7HmGVLyRTw5g
28
28
# If you support books that students must pay to access, provide Stripe keys.
Copy file name to clipboardExpand all lines: docker/docker_tools.py
+29-12Lines changed: 29 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -533,9 +533,22 @@ def _build_phase_0(
533
533
clone_bks=clone_all
534
534
clone_rc=clone_all
535
535
536
-
# Create the ``docker/.env`` if it doesn't already exist. TODO: keep a dict of {file name, checksum} and save as JSON. Use this to detect if a file was hand-edited; if not, we can simply replace it.
537
-
ifnotPath(".env").is_file():
538
-
xqt("cp docker/.env.prototype .env")
536
+
# Create ``docker/.env`` if it doesn't already exist or wasn't edited.
# ``sphinxcontrib.paverutils.run_sphinx`` lacks venv support -- it doesn't use ``sys.executable``, so it doesn't find ``sphinx-build`` in the system path when executing ``/srv/venv/bin/runestone`` directly, instead of activating the venv first (where it does work). As a huge, ugly hack, symlink it to make it available in the system path.
# Record info about this build. We can't provide ``git`` info, since the repo isn't available (the ``${RUNSTONE_PATH}.git`` directory is hidden, so it's not present at this time). Likewise, volumes aren't mapped, so ``git`` info for the Runestone Components and BookServer isn't available.
880
897
Path("/srv/build_info.txt").write_text(
881
898
f"Built on {datetime.datetime.now(datetime.timezone.utc)} using arguments {env.DOCKER_BUILD_ARGS}.\n"
@@ -1076,7 +1093,7 @@ def _build_phase_2_core(
1076
1093
1077
1094
# Utilities
1078
1095
# =========
1079
-
# A utility to replace all instances of ``${var_name}`` in a string, where the variables are provided in ``vars_``. This is an alternative to the build-in ``str.format()`` which doesn't require escaping all the curly braces.
1096
+
# A utility to replace all instances of ``${var_name}`` in a string, where the variables are provided in ``vars_``. This is an alternative to the built-in ``str.format()`` which doesn't require escaping all the curly braces.
# Update dependencies. See `scripts/poetry_fix.py`. This must come before Poetry, since it will check for the existence of the project created by these commands. (Even calling ``poetry config`` will perform this check!)
0 commit comments