Still a WIP, but wanted to save my progress before stopping for a few days. The steps to test are
First time (or after changes to docker-compose.yml or Dockerfile)
docker compose build # Builds application and DB containers
Database container
docker compose run --rm postgres bash
# You are now inside the DB container. The `learnscripture` DB is already created, just need to create another one for word suggesstions
createdb -U learnscripture -O learnscripture learnscripture_wordsuggestions
exit
Dev container
Add learnscripture/settings_local.py. We just need to update the database host to use the DB container
docker compose run --rm web bash
# You are now inside the web container, with Python, Node, and Elm installed
./manage.py migrate
./manage.py migrate --database wordsuggestions
# Haven't tested further than this...
Open questions
I haven't handled the texts repo, but most likely it will need to be manually cloned somewhere inside the container instead of accessing it from a parent folder in the host
The devcontainer.json file should allow devs to quickly get a VS Code project set up, and also work on the project using Codespaces.
Consider adding ruff and black as dev dependencies so we get specific versions in the container, not just the pre-commit hooks
Closes #204
Still a WIP, but wanted to save my progress before stopping for a few days. The steps to test are
First time (or after changes to
docker-compose.yml
orDockerfile
)Database container
Dev container
Add
learnscripture/settings_local.py
. We just need to update the database host to use the DB containerNow we can run migrations
Open questions
texts
repo, but most likely it will need to be manually cloned somewhere inside the container instead of accessing it from a parent folder in the hostdevcontainer.json
file should allow devs to quickly get a VS Code project set up, and also work on the project using Codespaces.