Skip to content

Commit

Permalink
Merge pull request #131 from stakwork/docker-build-test
Browse files Browse the repository at this point in the history
Docker build test
  • Loading branch information
Evanfeenstra committed Dec 18, 2020
2 parents 3fc8bfb + 6464301 commit 20800a6
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 22 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ FROM node:12-buster-slim AS builder

WORKDIR /relay
RUN mkdir /relay/.lnd
RUN touch /relay/connection_string.txt
RUN chmod 777 /relay/connection_string.txt
RUN cp /relay/config/app.json /relay/dist/config/app.json
RUN cp /relay/config/config.json /relay/dist/config/config.json
COPY . .
COPY --chown=1000:1000 . .

RUN apt-get update

Expand All @@ -16,6 +12,11 @@ RUN apt install -y g++ gcc libmcrypt-dev
RUN npm install bcrypt
RUN npm install

RUN cp /relay/config/app.json /relay/dist/config/app.json
RUN cp /relay/config/config.json /relay/dist/config/config.json

RUN chown -R 1000:1000 /relay

FROM node:12-buster-slim

USER 1000
Expand Down
3 changes: 2 additions & 1 deletion app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as cookieParser from 'cookie-parser'
import * as cors from 'cors'
import logger from './src/utils/logger'
import { pingHubInterval, checkInvitesHubInterval } from './src/hub'
import { setupDatabase, setupDone } from './src/utils/setup'
import { setupDatabase, setupDone, setupOwnerContact } from './src/utils/setup'
import * as controllers from './src/controllers'
import * as connect from './src/utils/connect'
import * as socket from './src/utils/socket'
Expand Down Expand Up @@ -43,6 +43,7 @@ async function mainSetup() {
}

async function finishSetup() {
setupOwnerContact()
await network.initTribesSubscriptions()
if (config.hub_api_url) {
checkInvitesHubInterval(5000)
Expand Down
1 change: 1 addition & 0 deletions dist/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/app.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions dist/src/controllers/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 20800a6

Please sign in to comment.