Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
chore: use main brain in gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Nov 30, 2020
1 parent 2455d11 commit 8229eda
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: ci
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
check:
Expand All @@ -15,12 +15,6 @@ jobs:
- run: yarn
- run: yarn lint
- run: yarn build
- uses: gozala/typescript-error-reporter-action@v1.0.4
- run: yarn aegir dep-check -- -i aegir
- uses: ipfs/aegir/actions/bundle-size@master
name: size
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
test-node:
needs: check
runs-on: ${{ matrix.os }}
Expand Down
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM node:lts-buster

# Install deps
RUN apt-get update && apt-get install -y

# Get dumb-init to allow quit running interactively
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && chmod +x /usr/local/bin/dumb-init

# Setup directories for the `node` user
RUN mkdir -p /home/node/app/hop-relay-server/node_modules && chown -R node:node /home/node/app/hop-relay-server

WORKDIR /home/node/app/hop-relay-server

# Install node modules
COPY package.json ./
# Switch to the node user for installation
USER node
RUN npm install --production

# Copy over source files under the node user
COPY --chown=node:node ./src ./src
COPY --chown=node:node ./README.md ./

# Environment variables


# hop-relay-server defaults to 15003
EXPOSE 15003

# metrics defaults to 8003
EXPOSE 8003

# Available overrides (defaults shown):
# Server logging can be enabled via the DEBUG environment variable
CMD [ "/usr/local/bin/dumb-init", "node", "src/server/bin.js"]
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getAnnounceAddresses(argv) {
module.exports.getAnnounceAddresses = getAnnounceAddresses

function getListenAddresses(argv) {
const listenAddr = argv.listenMultiaddrs || argv.lm || '/ip4/127.0.0.1/tcp/0/ws'
const listenAddr = argv.listenMultiaddrs || argv.lm || '/ip4/127.0.0.1/tcp/15003/ws'
const listenAddresses = [multiaddr(listenAddr)]

if (argv.listenMultiaddrs || argv.lm) {
Expand Down

0 comments on commit 8229eda

Please sign in to comment.