Skip to content
Make your own Datenspaziergang!
Ruby HTML JavaScript CSS Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
docker/nginx
lib
log
public
spec
test
tmp
vendor
.dockerignore
.gitignore
.rspec
.ruby-version
.travis.yml
Dockerfile
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
config.ru
docker-compose.yml
env.sample
package.json
yarn.lock

README.md

Spaziergang Creator Build Status Coverage Status

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.

Development setup

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.

Install JavaScript dependencies via npm/yarn $ npm install or $ yarn install.

Start the dev server $ rails s.

Tests

Run tests locally via $ rspec.

Deployment/ Production

I use docker/ docker-compose to build and serve the production app.

The docker-compose.yml defines three services in a network:

  • postgres, called db
  • the Spaziergang Creator app, called web
  • nginx to serve and cache static assets, called nginx

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.

Yay!

API docs

There are two API endpoints, /api/v1/walks and /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.

You can’t perform that action at this time.