Skip to content

interviewr/interviewr-server

Repository files navigation

interviewr-server Build Status GitHub issues GitHub contributors GitHub license

Interviewr backend service. It's part of interviewr-docker.

Prerequisites

  • go-bindata - Converts any file into managable Go source code;
  • dep - Dependency management tool for Go;
  • PostgreSQL.

Running

  1. Clone this repo
$ git clone https://github.com/interviewr/interviewr-server.git
  1. Install dependencies
$ dep ensure
  1. Build binary
make build
  1. Run service
$ ./bin/entry

Development

Configuration

You can configure service by editing config.json located at the root of project. Also variables from config.json can be configured via environment variables prefixed with INTERVIEWR_SERVER_. For example:

INTERVIEWR_SERVER_DEBUG=false
INTERVIEWR_SERVER_ADDRESS=:8090
INTERVIEWR_SERVER_DATABASE_HOST=db

Available commands

Build service:

make build

Update service dependencies:

make dep

Build docker image:

make image-build

Run docker container:

make image-run

Publish docker image to DockerHub registry:

make image-publish

Database

For running service you should have running instance of postgres. If you have Docker:

$ docker pull postgres
$ make postgres-run

After that create database with name interviewr.

Also you can run Adminer - Database management tool

$ docker pull adminer
$ make adminer-run

Adminer will be available at http://localhost:8080. You can reach postgres server using db name as server field.

Docker image

Also you can grab prepared docker image from DockerHub

$ docker pull ok2ju/interviewr-server

Notes

To keep docker image lightweight and simple it contains only resulting binary. So we build app locally and just copy binary.