Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Si committed Sep 14, 2022
0 parents commit 66dbe5c
Show file tree
Hide file tree
Showing 279 changed files with 30,857 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
32 changes: 32 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
APP_PORT=4000
APP_COOKIE_KEY=koa.sess
APP_COOKIE_DOMAIN=stream.resonate.localhost
APP_KEY="213"
APP_KEY_2="124"
APP_EMAIL="resonate.com"
APP_HOST='http://localhost:4000'
STREAM_APP_HOST=https://beta.stream.resonate.localhost
STATIC_MEDIA_HOST=http://localhost:4000

NGINX_PORT=3001

POSTGRES_HOSTNAME=pgsql
POSTGRES_EXT_PORT=5432
POSTGRES_LOCAL_MACHINE_PORT=5432
POSTGRES_USER=resonate
POSTGRES_PASSWORD=resonate
POSTGRES_DB=resonate

REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=password

STRIPE_KEY=test

GRANT_ORIGIN=https://beta.stream.resonate.localhost/api/v2
GRANT_PREFIX='/user/connect'

SEARCH_API_PROTOCOL=http
SEARCH_API_HOST=localhost:3001

USER_API_HOST='https://0.0.0.0:11000'
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

# github: # Replace with a single Patreon username
patreon: # Replace with a single Patreon username
open_collective: resonate
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
15 changes: 15 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Lint Commit Messages
on:
push:
branches:
- main
pull_request:

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
20 changes: 20 additions & 0 deletions .github/workflows/custom-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint primarily with prettier
on:
push:
branches:
- main
pull_request:

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2

- name: Install our packages
run: yarn install

- name: Lint
run: yarn test:lint
18 changes: 18 additions & 0 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy to Stage
on: [push]
jobs:
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER}}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
cd api
git pull
docker-compose up --no-deps -d --force-recreate api
20 changes: 20 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Unit tests
on:
push:
branches:
- main
pull_request:

jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2

- name: Install our packages
run: yarn install

- name: Run our tests
run: yarn test
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.env
.vscode
node_modules

data
yarn-error.log
error.log

jwk-keys.json
cookies-keys.json

backups
src/db/legacy/config.js
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM jrottenberg/ffmpeg:5.0-alpine as ffmpeg

FROM node:16-alpine

ENV NODE_APP_DIR=/var/www/api/src
WORKDIR /var/www/api

COPY . .
RUN yarn install --force

# copy ffmpeg bins
COPY --from=ffmpeg / /

EXPOSE 4000

CMD ["yarn", "start-dev"]
Loading

0 comments on commit 66dbe5c

Please sign in to comment.