Create a new docker container with the Solr 8.6 image:
docker run --name solr86 -p 8983:8983 -t solr:8.6
Copy the solr config files in as a configset named ppa:
docker cp solr_conf solr86:/opt/solr/server/solr/configsets/shxco
Change ownership of the configset files to the solr user:
docker exec --user root solr86 /bin/bash -c "chown -R solr:solr /opt/solr/server/solr/configsets/shxco"
Copy the configsets to the solr data directory:
docker exec -d solr86 cp -r /opt/solr/server/solr/configsets /var/solr/data
Create a new core with the ppa configset:
curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=shxco&configSet=shxco"
When the configset has changed, copy in the updated solr config files:
docker cp solr_conf/* solr86:/opt/solr/server/solr/configsets/shxco/
If exists, drop current:
psql -d postgres -c "DROP DATABASE cdh_shxco;" psql -d postgres -c "DROP ROLE cdh_shxco;"
Create role and password:
psql -d postgres -c "CREATE ROLE cdh_shxco WITH CREATEDB LOGIN PASSWORD 'cdh_shxco';"
Import database dump (change path as appropriate):
psql -d postgres -U cdh_shxco < data/13_daily_cdh_shxco_cdh_shxco_2023-12-03.Sunday.sql
Or all together to wipe database and reapply migrations:
psql -d postgres -c "DROP DATABASE cdh_shxco;" psql -d postgres -c "DROP ROLE cdh_shxco;" psql -d postgres -c "CREATE ROLE cdh_shxco WITH CREATEDB LOGIN PASSWORD 'cdh_shxco';" psql -d postgres -U cdh_shxco < data/13_daily_cdh_shxco_cdh_shxco_2023-12-03.Sunday.sql python manage.py migrate python manage.py createsuperuser # if developing locally
In order for DocRaptor to read any content, when testing PDF generation locally you must open your localhost to the public with a service like Cloudflare Tunnel, e.g.:
npx cloudflared tunnel --url http://localhost:8000
Then in Wagtail Site settings, set the default Site's hostname to the tunnel's
public hostname (no protocol/slashes), and port 80. That way,
GeneratePdfPanel.BoundPanel.instance.full_url resolves to a public URL.
Finally, set your ALLOWED_HOSTS setting to allow traffic via that domain,
or simply set ALLOWED_HOSTS = ["*"].
Note that this will not work in Webpack dev mode.
Also, due to the use of licensed fonts, developers will need to get the fonts
from the shared Google Drive and place them in /sitemedia/fonts to see
accurate PDF previews.
When finished, set the default Site back to localhost and port 8000.