Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Documentation
docs/
32 changes: 32 additions & 0 deletions .github/workflows/deploy-room-manager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Room Manager

on:
push:
branches: [main]

workflow_dispatch:

jobs:
cd:
runs-on: self-hosted

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Room Manager example
run: docker build -f examples/room-manager/Dockerfile -t gh-runner-room-manager .

- name: Clean up the previous Room Manager container
run: docker rm -f gh-runner-room-manager

- name: Run Room Manager example
run: |
docker run -d -p 8080:8080 \
--name gh-runner-room-manager \
-e PORT=8080 \
-e PEERLESS_PURGE_TIMEOUT=600 \
-e FISHJAM_URL=${{ secrets.ROOM_MANAGER_FISHJAM_URL }} \
-e FISHJAM_SERVER_TOKEN=${{ secrets.ROOM_MANAGER_FISHJAM_SERVER_TOKEN }} \
-e WEBHOOK_URL=${{ secrets.ROOM_MANAGER_WEBHOOK_URL }} \
gh-runner-room-manager
21 changes: 21 additions & 0 deletions examples/room-manager/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# NOTE: This Dockerfile needs to be built from the context of root of the repository
FROM node:20

# Step 1: Install SDK
WORKDIR /app

COPY package.json package-lock.json ./

# Ignore scripts - postpone the prepare script until the source code is copied
RUN npm ci --ignore-scripts

COPY . .

RUN npm run prepare

# Step 2: Install and run the example
WORKDIR /app/examples/room-manager

RUN npm ci

CMD ["npm", "start"]