Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
-v <volume name>:<path to mount>

Establishing database file

After the first time python3 manage.py migrate has been run,

  • Transfer the db.sqlite3 file to the mounted volume.

  • Delete the db.sqlite3 file from its default location at the project root folder.

  • Create a symlink at the project root folder called db.sqlite3 that points to the file on the mounted volume.

Database connection using entrypoint.sh

It is recommended that the entrypoint.sh script is used to establish the database connection. The general sequence in the entrypoint.sh script to connect the database on the volume is:

...