Skip to content

Commit cda38df

Browse files
committed
run flashlight in a docker container
1 parent 2c85df5 commit cda38df

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.*?

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:6.9.2-alpine
2+
3+
ARG APP_DIR=/opt/app
4+
WORKDIR $APP_DIR
5+
6+
COPY package.json $APP_DIR/
7+
RUN npm install
8+
9+
COPY lib/ $APP_DIR/lib/
10+
COPY app.js $APP_DIR/
11+
COPY config.example.js $APP_DIR/config.js
12+
13+
CMD ["node", "./app.js"]

config.example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
***************************************************/
1111

1212
// Your Firebase instance where we will listen and write search results
13-
exports.FB_URL = 'https://<YOUR APP>.firebaseio.com';
13+
exports.FB_URL = process.env.FB_URL || 'https://<YOUR APP>.firebaseio.com';
1414

1515
// The path in your Firebase where clients will write search requests
1616
exports.FB_REQ = process.env.FB_REQ || 'search/request';

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: "2"
2+
3+
services:
4+
flashlight:
5+
build: .
6+
image: flashlight:dev
7+
environment:
8+
FB_URL: https://my-project.firebaseio.com
9+
ES_HOST: elasticsearch
10+
NODE_ENV: production
11+
volumes:
12+
- ./service-account.json:/opt/app/service-account.json
13+
14+
elasticsearch:
15+
image: elasticsearch:5.1.1-alpine

0 commit comments

Comments
 (0)