Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
/ journal Public archive

Simple HTTP server that serves journal entries from a Postgres DB.

Notifications You must be signed in to change notification settings

uhlig-it/journal

Repository files navigation

Journal

Build Status

Simple HTTP server that serves journal entries from a Postgres DB.

Development

Local

  1. Source the .envrc, either using direnv, or manually with source .envrc.

  2. Start the database server with postgres; the variables set in the previous step will make sure that the postgres directory is used.

  3. Migrate the database:

    bundle exec rake db:migrate
  4. Run the app:

    rerun bundle exec ruby app.rb

Docker

$ bundle exec rake docker:build
$ docker run -it --rm suhlig/journal
$ bundle exec rake docker:push

Docker Compose

We do not rely on proper service startup order as it would only complicate things.

$ docker-compose up db
$ docker-compose run web bundle exec rake db:migrate
$ docker-compose up web

Troubleshooting

Use the sequel database monitor

$ bundle exec sequel $DB