Interviewr backend service. It's part of interviewr-docker.
- go-bindata - Converts any file into managable Go source code;
- dep - Dependency management tool for Go;
- PostgreSQL.
- Clone this repo
$ git clone https://github.com/interviewr/interviewr-server.git
- Install dependencies
$ dep ensure
- Build binary
make build
- Run service
$ ./bin/entry
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
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
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.
Also you can grab prepared docker image from DockerHub
$ docker pull ok2ju/interviewr-server
To keep docker image lightweight and simple it contains only resulting binary. So we build app locally and just copy binary.