mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 02:12:40 +01:00
prettier formatted and simplified README links
This commit is contained in:
parent
cbcb9edcaa
commit
87613b7447
@ -1,2 +1,2 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
db/
|
db/
|
||||||
|
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1 +1 @@
|
|||||||
open_collective: fosscord
|
open_collective: fosscord
|
||||||
|
78
.github/workflows/docker-publish-api.yml
vendored
78
.github/workflows/docker-publish-api.yml
vendored
@ -1,47 +1,41 @@
|
|||||||
name: docker-publish-api
|
name: docker-publish-api
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'api/**'
|
- "api/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-api:
|
docker-api:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
- name: Set up Docker Buildx
|
||||||
-
|
uses: docker/setup-buildx-action@v1
|
||||||
name: Set up Docker Buildx
|
- name: Cache Docker layers
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: actions/cache@v2
|
||||||
-
|
with:
|
||||||
name: Cache Docker layers
|
path: /tmp/.buildx-cache/api
|
||||||
uses: actions/cache@v2
|
key: ${{ runner.os }}-buildx-api-${{ github.sha }}
|
||||||
with:
|
restore-keys: |
|
||||||
path: /tmp/.buildx-cache/api
|
${{ runner.os }}-buildx-api-
|
||||||
key: ${{ runner.os }}-buildx-api-${{ github.sha }}
|
- name: Login to DockerHub
|
||||||
restore-keys: |
|
uses: docker/login-action@v1
|
||||||
${{ runner.os }}-buildx-api-
|
with:
|
||||||
-
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
name: Login to DockerHub
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
uses: docker/login-action@v1
|
- name: Build and push
|
||||||
with:
|
uses: docker/build-push-action@v2
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
with:
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
context: ./api
|
||||||
-
|
push: true
|
||||||
name: Build and push
|
tags: ${{ secrets.DOCKERHUB_TAGS_API }}
|
||||||
uses: docker/build-push-action@v2
|
cache-from: type=local,src=/tmp/.buildx-cache/api
|
||||||
with:
|
cache-to: type=local,dest=/tmp/.buildx-cache-new/api
|
||||||
context: ./api
|
- # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
|
||||||
push: true
|
# https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
|
||||||
tags: ${{ secrets.DOCKERHUB_TAGS_API }}
|
name: Move cache fix
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache/api
|
run: |
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new/api
|
rm -rf /tmp/.buildx-cache/api
|
||||||
-
|
mv /tmp/.buildx-cache-new/api /tmp/.buildx-cache/api
|
||||||
# Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
|
|
||||||
# https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
|
|
||||||
name: Move cache fix
|
|
||||||
run: |
|
|
||||||
rm -rf /tmp/.buildx-cache/api
|
|
||||||
mv /tmp/.buildx-cache-new/api /tmp/.buildx-cache/api
|
|
||||||
|
78
.github/workflows/docker-publish-cdn.yml
vendored
78
.github/workflows/docker-publish-cdn.yml
vendored
@ -1,47 +1,41 @@
|
|||||||
name: docker-publish-cdn
|
name: docker-publish-cdn
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'cdn/**'
|
- "cdn/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-cdn:
|
docker-cdn:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
- name: Set up Docker Buildx
|
||||||
-
|
uses: docker/setup-buildx-action@v1
|
||||||
name: Set up Docker Buildx
|
- name: Cache Docker layers
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: actions/cache@v2
|
||||||
-
|
with:
|
||||||
name: Cache Docker layers
|
path: /tmp/.buildx-cache/cdn
|
||||||
uses: actions/cache@v2
|
key: ${{ runner.os }}-buildx-cdn-${{ github.sha }}
|
||||||
with:
|
restore-keys: |
|
||||||
path: /tmp/.buildx-cache/cdn
|
${{ runner.os }}-buildx-cdn-
|
||||||
key: ${{ runner.os }}-buildx-cdn-${{ github.sha }}
|
- name: Login to DockerHub
|
||||||
restore-keys: |
|
uses: docker/login-action@v1
|
||||||
${{ runner.os }}-buildx-cdn-
|
with:
|
||||||
-
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
name: Login to DockerHub
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
uses: docker/login-action@v1
|
- name: Build and push
|
||||||
with:
|
uses: docker/build-push-action@v2
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
with:
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
context: ./cdn
|
||||||
-
|
push: true
|
||||||
name: Build and push
|
tags: ${{ secrets.DOCKERHUB_TAGS_CDN }}
|
||||||
uses: docker/build-push-action@v2
|
cache-from: type=local,src=/tmp/.buildx-cache/cdn
|
||||||
with:
|
cache-to: type=local,dest=/tmp/.buildx-cache-new/cdn
|
||||||
context: ./cdn
|
- # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
|
||||||
push: true
|
# https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
|
||||||
tags: ${{ secrets.DOCKERHUB_TAGS_CDN }}
|
name: Move cache fix
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache/cdn
|
run: |
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new/cdn
|
rm -rf /tmp/.buildx-cache/cdn
|
||||||
-
|
mv /tmp/.buildx-cache-new/cdn /tmp/.buildx-cache/cdn
|
||||||
# Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
|
|
||||||
# https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
|
|
||||||
name: Move cache fix
|
|
||||||
run: |
|
|
||||||
rm -rf /tmp/.buildx-cache/cdn
|
|
||||||
mv /tmp/.buildx-cache-new/cdn /tmp/.buildx-cache/cdn
|
|
||||||
|
78
.github/workflows/docker-publish-gateway.yml
vendored
78
.github/workflows/docker-publish-gateway.yml
vendored
@ -1,47 +1,41 @@
|
|||||||
name: docker-publish-gw
|
name: docker-publish-gw
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'gateway/**'
|
- "gateway/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-gw:
|
docker-gw:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
- name: Set up Docker Buildx
|
||||||
-
|
uses: docker/setup-buildx-action@v1
|
||||||
name: Set up Docker Buildx
|
- name: Cache Docker layers
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: actions/cache@v2
|
||||||
-
|
with:
|
||||||
name: Cache Docker layers
|
path: /tmp/.buildx-cache/gw
|
||||||
uses: actions/cache@v2
|
key: ${{ runner.os }}-buildx-gw-${{ github.sha }}
|
||||||
with:
|
restore-keys: |
|
||||||
path: /tmp/.buildx-cache/gw
|
${{ runner.os }}-buildx-gw-
|
||||||
key: ${{ runner.os }}-buildx-gw-${{ github.sha }}
|
- name: Login to DockerHub
|
||||||
restore-keys: |
|
uses: docker/login-action@v1
|
||||||
${{ runner.os }}-buildx-gw-
|
with:
|
||||||
-
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
name: Login to DockerHub
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
uses: docker/login-action@v1
|
- name: Build and push
|
||||||
with:
|
uses: docker/build-push-action@v2
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
with:
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
context: ./gateway
|
||||||
-
|
push: true
|
||||||
name: Build and push
|
tags: ${{ secrets.DOCKERHUB_TAGS_GW }}
|
||||||
uses: docker/build-push-action@v2
|
cache-from: type=local,src=/tmp/.buildx-cache/gw
|
||||||
with:
|
cache-to: type=local,dest=/tmp/.buildx-cache-new/gw
|
||||||
context: ./gateway
|
- # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
|
||||||
push: true
|
# https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
|
||||||
tags: ${{ secrets.DOCKERHUB_TAGS_GW }}
|
name: Move cache fix
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache/gw
|
run: |
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new/gw
|
rm -rf /tmp/.buildx-cache/gw
|
||||||
-
|
mv /tmp/.buildx-cache-new/gw /tmp/.buildx-cache/gw
|
||||||
# Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
|
|
||||||
# https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
|
|
||||||
name: Move cache fix
|
|
||||||
run: |
|
|
||||||
rm -rf /tmp/.buildx-cache/gw
|
|
||||||
mv /tmp/.buildx-cache-new/gw /tmp/.buildx-cache/gw
|
|
||||||
|
182
.github/workflows/release.yml
vendored
182
.github/workflows/release.yml
vendored
@ -1,101 +1,101 @@
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
# Sequence of patterns matched against refs/tags
|
# Sequence of patterns matched against refs/tags
|
||||||
tags:
|
tags:
|
||||||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
name: Publish Release
|
name: Publish Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
insiders-build:
|
insiders-build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows, macos, ubuntu]
|
os: [windows, macos, ubuntu]
|
||||||
include:
|
include:
|
||||||
- os: windows
|
- os: windows
|
||||||
file: fosscord-server-windows.exe
|
file: fosscord-server-windows.exe
|
||||||
package: ""
|
package: ""
|
||||||
artifact: fosscord-server-windows.exe
|
artifact: fosscord-server-windows.exe
|
||||||
- os: macos
|
- os: macos
|
||||||
file: fosscord-server.app
|
file: fosscord-server.app
|
||||||
package: tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
|
package: tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
|
||||||
artifact: fosscord-server-macos.app.tgz
|
artifact: fosscord-server-macos.app.tgz
|
||||||
- os: ubuntu
|
- os: ubuntu
|
||||||
file: fosscord
|
file: fosscord
|
||||||
package: chmod +x fosscord && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
|
package: chmod +x fosscord && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
|
||||||
artifact: fosscord-server-linux.tgz
|
artifact: fosscord-server-linux.tgz
|
||||||
runs-on: ${{ matrix.os }}-latest
|
runs-on: ${{ matrix.os }}-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
env:
|
env:
|
||||||
MONGOMS_VERSION: 4.4.3
|
MONGOMS_VERSION: 4.4.3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
- run: |
|
- run: |
|
||||||
cd bundle
|
cd bundle
|
||||||
npm run setup
|
npm run setup
|
||||||
npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output '${{matrix.file}}' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/bundle/src/start.js'
|
npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output '${{matrix.file}}' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/bundle/src/start.js'
|
||||||
${{ matrix.package }}
|
${{ matrix.package }}
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact }}
|
name: ${{ matrix.artifact }}
|
||||||
path: bundle/${{ matrix.artifact }}
|
path: bundle/${{ matrix.artifact }}
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [insiders-build]
|
needs: [insiders-build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: fosscord-server-windows.exe
|
name: fosscord-server-windows.exe
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: fosscord-server-macos.app.tgz
|
name: fosscord-server-macos.app.tgz
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: fosscord-server-linux.tgz
|
name: fosscord-server-linux.tgz
|
||||||
- uses: actions/create-release@v1
|
- uses: actions/create-release@v1
|
||||||
id: create-release
|
id: create-release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ secrets.RELEASE_VERSION }}
|
tag_name: v${{ secrets.RELEASE_VERSION }}
|
||||||
release_name: Server v${{ secrets.RELEASE_VERSION }}
|
release_name: Server v${{ secrets.RELEASE_VERSION }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: true # TODO: change this to false
|
prerelease: true # TODO: change this to false
|
||||||
body: >
|
body: >
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
- [Windows](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-windows.exe)
|
- [Windows](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-windows.exe)
|
||||||
|
|
||||||
- [MacOS](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-macos.app.tgz)
|
- [MacOS](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-macos.app.tgz)
|
||||||
|
|
||||||
- [Linux](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-linux.tgz)
|
- [Linux](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-linux.tgz)
|
||||||
|
|
||||||
- uses: actions/upload-release-asset@v1
|
- uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||||
asset_path: fosscord-server-windows.exe
|
asset_path: fosscord-server-windows.exe
|
||||||
asset_name: fosscord-server-windows.exe
|
asset_name: fosscord-server-windows.exe
|
||||||
asset_content_type: application/vnd.microsoft.portable-executable
|
asset_content_type: application/vnd.microsoft.portable-executable
|
||||||
- uses: actions/upload-release-asset@v1
|
- uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||||
asset_path: fosscord-server-macos.app.tgz
|
asset_path: fosscord-server-macos.app.tgz
|
||||||
asset_name: fosscord-server-macos.app.tgz
|
asset_name: fosscord-server-macos.app.tgz
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
||||||
- uses: actions/upload-release-asset@v1
|
- uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||||
asset_path: fosscord-server-linux.tgz
|
asset_path: fosscord-server-linux.tgz
|
||||||
asset_name: fosscord-server-linux.tgz
|
asset_name: fosscord-server-linux.tgz
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -8,4 +8,4 @@ database.db
|
|||||||
tsconfig.tsbuildinfo
|
tsconfig.tsbuildinfo
|
||||||
files/
|
files/
|
||||||
.env
|
.env
|
||||||
config.json
|
config.json
|
||||||
|
4
.prettierrc
Normal file
4
.prettierrc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"tabWidth": 4,
|
||||||
|
"useTabs": true
|
||||||
|
}
|
16
README.md
16
README.md
@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
This repository contains:
|
This repository contains:
|
||||||
|
|
||||||
- [Fosscord HTTP API Server](https://github.com/fosscord/fosscord-server/tree/master/api)
|
- [Fosscord HTTP API Server](/api)
|
||||||
- [WebSocket Gateway Server](https://github.com/fosscord/fosscord-server/tree/master/gateway)
|
- [WebSocket Gateway Server](/gateway)
|
||||||
- [HTTP CDN Server](https://github.com/fosscord/fosscord-server/tree/master/cdn)
|
- [HTTP CDN Server](/cdn)
|
||||||
- [Utility and Database Models](https://github.com/fosscord/fosscord-server/tree/master/util)
|
- [Utility and Database Models](/util)
|
||||||
- [RTC Server](https://github.com/fosscord/fosscord-server/tree/master/rtc)
|
- [RTC Server](/rtc)
|
||||||
- [WebRTC Server](https://github.com/fosscord/fosscord-server/tree/master/webrtc)
|
- [WebRTC Server](/webrtc)
|
||||||
- [Admin Dashboard](https://github.com/fosscord/fosscord-server/tree/master/dashboard)
|
- [Admin Dashboard](/dashboard)
|
||||||
|
|
||||||
## [Resources](https://docs.fosscord.com/resources/)
|
## [Resources](https://docs.fosscord.com/resources/)
|
||||||
|
|
||||||
@ -32,4 +32,4 @@ This repository contains:
|
|||||||
|
|
||||||
## [Setup](https://docs.fosscord.com/setup/server/)
|
## [Setup](https://docs.fosscord.com/setup/server/)
|
||||||
|
|
||||||
- [Download](https://github.com/fosscord/fosscord-server/releases)
|
- [Download](https://github.com/fosscord/fosscord-server/releases)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
files:
|
files:
|
||||||
- source: /api/locales/en/*.json
|
- source: /api/locales/en/*.json
|
||||||
translation: /api/locales/%two_letters_code%/%original_file_name%
|
translation: /api/locales/%two_letters_code%/%original_file_name%
|
||||||
|
@ -21,4 +21,4 @@ services:
|
|||||||
- db
|
- db
|
||||||
ports:
|
ports:
|
||||||
- 3002:3002
|
- 3002:3002
|
||||||
env_file: ./.docker/env
|
env_file: ./.docker/env
|
||||||
|
@ -26,4 +26,4 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"settings": {}
|
"settings": {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user