An open-source project to create a map of safe spaces for people in need.
We provide docker images that are ready to deploy SafeHaven. You can find the releases in the packages view of the SafeHavenMaps organisation.
Create a database:
CREATE DATABASE safehaven;
SafeHaven leverages PostgreSQL's full text search capabilities. You can help the indexer by setting a locale on the database:
ALTER DATABASE safehaven SET default_text_search_config = 'pg_catalog.french';
SafeHaven is initialized with a default user named admin
with a random password, which can be retrieved from backend logs.
The administration panel will provide you with the ability to create new users and manage the application.
To learn more about the configuration, you can visit our documentation website.
docker run -d \
-e SH__DATABASE__URL="postgresql://user:password@host/safehaven" \ # Set the database path
-e SH__DATABASE__POOL_SIZE="5" \ # Set the number of connections to the database
-e SH__SECURE_COOKIE="true" \ # Activate if you have a reverse proxy with HTTPS.
-e SH__TOKEN_SECRET="SecretForValidatingAngSigningTokens" \ # Set a secret that will be used to sign sessions
ghcr.io/safehavenmaps/safehaven:1.0.0 # Change latest to the latest version, check the releases
We welcome contributions from everyone.
To spin up a development environment, follow these steps:
Pre-requisites:
Steps:
nix develop
to enter a development environmentbackend
folder
sqlx migrate run
to create the database schemafrontend
folder
npm install
to install the dependenciesregen_api
to regenerate the APIstart_dev_env
to start the stack using process-composedb
to start_dev_env
to start a PostgreSQL server if you do not have one.