My dockerised Directus CMS application to enable easy and customisable integration with geospatial data
This is a project exploring self-hosting a Directus CMS using Docker and PostGIS for geospatial data.
Run the project locally:
Clone the repo:
git clone https://github.com/suizer98/geodirectus.git
cd to it and spin it up:
cd geodirectus
docker-compose up
Access the CMS at: http://localhost:8055
You can straightaway build the self hosting Directus using the sample postgres data in this repo. However if you need to start from scratch better to remove the sample data:
sudo rm -rf postgres/data
docker-compose down -v
docker-compose up
Since it is running in Docker instances, we can do below:
docker exec -t geodirectus-postgres-1 pg_dump -U postgres postgres > postgres/backup.sql
To restore using the backup.sql
, we can edit postgres/backup.sql
to avoid restoration errors:
CREATE SCHEMA IF NOT EXISTS tiger;
CREATE SCHEMA IF NOT EXISTS tiger_data;
CREATE SCHEMA IF NOT EXISTS topology;
Make sure we add IF NOT EXISTS
for these 3 lines from PostGIS image.
To sneak peek to your postgres relevant settings and data, go to the volume mounted:
# Not recommended, this is just testing to override permission
sudo chmod -R 777 postgres/data
ls postgres/data