Extract and cite machine-readable knowledge in documents on the web
If starting from scratch...to build, generate database migrations, test, and check (with ruff) locally:
docker compose up -d --build
docker compose exec web aerich init-db
docker compose exec web python -m pytest # --cov="." --cov-report html
docker compose exec web ruff check . # or ruff check --fix .docker build -f phicite/Dockerfile.prod -t web ./phicite
docker run --name phicite -e PORT=8765 -e DATABASE_URL=sqlite://sqlite.db -p 5003:8765 web:latestNavigate to http://localhost:5003/ping/.
Bring down the container when done:
docker rm phicite -fheroku login
heroku create # store app name in APP_NAME
heroku container:login
heroku addons:create heroku-postgresql:essential-0 --app ${APP_NAME}heroku login
heroku run -a ${APP_NAME} aerich upgradecd phicite
poetry run python prod_testing.pyTo delete and recreate the existing web_dev and web_test databases in your Docker PostgreSQL container, you can use the following commands:
# Connect to the database container
docker compose exec web-db psql -U postgres
# Inside the PostgreSQL prompt, run:
DROP DATABASE IF EXISTS web_dev;
DROP DATABASE IF EXISTS web_test;
# Then create them again
CREATE DATABASE web_dev;
CREATE DATABASE web_test;
# Exit PostgreSQL
\qrm -rf phicite/migrations
docker compose down
docker compose up -d --build
docker compose exec web aerich init -t app.db.TORTOISE_ORM