What is this?
Spaziergang Creator a web-based tool to create your own Datenspaziergang.
It also serves as an API server for the mentioned frontend app.
Ruby 2.6.3 A recent version of node
Clone the repo and run
$ bundle (install bundler via
gem install bundler if you haven't yet).
Copy and adjust the .env variables
$ cp env.sample .env && source .env
Copy and adjust the database config
$ cp config/database.yml.example config/database.yml.
Setup database and run migrations
$ rails db:create db:migrate.
$ npm install or
$ yarn install.
Start the dev server
$ rails s.
Run tests locally via
I use docker/ docker-compose to build and serve the production app.
docker-compose.yml defines three services in a network:
- postgres, called
- the Spaziergang Creator app, called
- nginx to serve and cache static assets, called
Copy and adjust the env variables
$ cp env.sample .env, docker-compose will read the values from there.
After that you can
$ docker-compose build to build the images and
$ docker-compose up -d to start the whole thing.
When you set this up for the first time don't forget run the database migrations with
$ docker exec spaziergang-creator_web_1 rails db:migrate. Pid instead of container name also works.
There are two API endpoints,
/api/v1/walks/:id serving a list of public walks and details of one walk respectively.
The payloads are designed to match the original payload of the prototype.