- Clone the repo using git
git clone git@github.com:Bolls-Bible/bain.gitmake build
make create-networkNow add bolls.local to your hosts file (on linux it's /etc/hosts) and generate ssl certificates by running
make mkcert-installIf you're on Windows, install mkcert using chocolatey or scoop and run the following command to generate the certificates:
mkcert -install
mkcert -cert-file "C:\path-to-the-project\bain\nginx_dev\certs\local-cert.pem" -key-file "C:\path-to-the-project\bain\nginx_dev\certs\local-key.pem" "bolls.local"Then create .env.dev (may be empty) and run the application with
sudo sysctl net.ipv4.ip_unprivileged_port_start=80 # only for linux to allow non-root process to bind to port 80
make upAnd don't forget to run migrations and create a superuser with
make migrate
make createsuperuserOnce it runs you can download and restore essential tables in the database, run
make restore-dbNow you should be able to open the application in your browser at https://bolls.local
docker compose up -d --force-recreate
docker compose ps
docker compose logs -f --tail 8
docker compose stop
docker compose exec django python manage.py makemigrations
docker compose exec django python manage.py migrate --noinput
docker cp ./django/sql/unaccent_plus.rules db:/usr/local/share/postgresql/tsearch_data/unaccent_plus.rules
docker exec -i db psql -U django -d cotton -c "ALTER TEXT SEARCH DICTIONARY unaccent (RULES='unaccent_plus')"
docker cp ./django/sql/unaccent_plus.rules database:/usr/local/share/postgresql/tsearch_data/unaccent_plus.rules
docker exec -t database psql -U postgres_user -d postgres_db -c "CREATE EXTENSION unaccent;"
docker exec -i database psql -U postgres_user -d postgres_db -c "ALTER TEXT SEARCH DICTIONARY unaccent (RULES='unaccent_plus')"
docker compose exec -T django python manage.py test --keepdb