Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP] Docker #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions example/Dockerfile
@@ -0,0 +1,11 @@
FROM mhart/alpine-iojs:latest
MAINTAINER Thibault NORMAND <me@zenithar.org>

COPY . /app
WORKDIR /app

RUN npm install --save feedback-to-gitlab express

EXPOSE 3000
CMD ["node", "server.js"]

10 changes: 10 additions & 0 deletions example/README.md
@@ -0,0 +1,10 @@
# feedback-to-gitlab in Docker

To build image :
> docker build -ti <user>/feedback .

To run feedback server :
> docker run -ti -e GITLAB_URL=<url> -e GITLAB_TOKEN=<token> -e GITLAB_REPOSITORY=<repo> <user>/feedback


You reverse to it using an “/feedback” mapping with haproxy or nginx depending on your system.
12 changes: 12 additions & 0 deletions example/server.js
@@ -0,0 +1,12 @@
var express = require('express'),
feedback = require('feedback-to-gitlab');

var app = express();

app.post('/feedback', feedback({
url: process.env.GITLAB_URL,
token: process.env.GITLAB_TOKEN,
repository: process.env.GITLAB_REPOSITORY
}))

app.listen(3000);