If you want to develop with dawarich you can use the devcontainer, with your IDE. It is tested with visual studio code.
NOTE: On Apple Silicon (M1/M2/M3), postgis/postgis:17-3.5-alpine is not available due to architecture mismatch.
In .devcontainer/docker-compose.yml, replace it with imresamu/postgis:17-3.5-alpine instead before building the container.
Load the directory in Vs-Code and press F1. And Run the command: Dev Containers: Rebuild Containers after a while you should see a terminal.
Now you can create/prepare the Database (this need to be done once):
bundle exec rails db:prepareAfterwards you can run sidekiq:
bundle exec sidekiq
And in a second terminal the dawarich-app:
bundle exec bin/devYou can connect with a web browser to http://127.0.0.1:3000/ and login with the default credentials.
- Ruby — version specified in
.ruby-version(currently 3.4.9). Userbenv,asdf, ormise. - PostgreSQL ≥ 14 with the PostGIS extension, listening on
localhost:5432. - Redis, listening on
localhost:6379.
cp .env.example .env
# Edit .env and fill in the required values (see comments in .env.example).config/database.yml reads discrete DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME, and DATABASE_PORT variables — not a single DATABASE_URL.
bundle install
bundle exec rails db:prepare # creates databases and runs migrations
bundle exec sidekiq & # background job worker (keep running)
bundle exec bin/dev # starts the web server + asset pipelineOpen http://127.0.0.1:3000/ and log in with the default credentials:
- Email:
demo@dawarich.app - Password:
safepassword
RAILS_ENV=test bundle exec rspecDotenv automatically loads .env.test so no extra setup is needed.
⚠️ Never runrails db:test:prepareorrails db:schema:loadagainst an existing local database that has thetiger_geocoderextension (common on long-lived local Postgres installs). The schema load fails midway and leavesdawarich_testempty. If your test DB breaks, rebuild it by cloning a known-good database withpg_dump/pg_restore— fresh databases (new containers, CI) loaddb/schema.rbwithout issue.