-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Promise <me@promise.solutions>
- Loading branch information
Showing
43 changed files
with
8,632 additions
and
8,633 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"github>promise/renovate-config", | ||
"github>promise/renovate-config:force-node-version(22)", | ||
"github>promise/renovate-config:force-mongo-version(8)" | ||
] | ||
} | ||
{ | ||
"extends": [ | ||
"github>promise/renovate-config", | ||
"github>promise/renovate-config:force-node-version(22)", | ||
"github>promise/renovate-config:force-mongo-version(8)" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
_extends: .github | ||
|
||
repository: | ||
name: test-area | ||
description: "A Discord bot to easily create testing servers, without having to write in that 2FA code to delete it later" | ||
private: false | ||
topics: "discord, discord-bot, testing-tools, utility" | ||
_extends: .github | ||
|
||
repository: | ||
name: test-area | ||
description: "A Discord bot to easily create testing servers, without having to write in that 2FA code to delete it later" | ||
private: false | ||
topics: "discord, discord-bot, testing-tools, utility" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: Docker Compose | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: Test Build | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Touch .env file | ||
run: touch ".env" | ||
|
||
- name: Test docker compose build | ||
run: docker compose build | ||
name: Docker Compose | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: Test Build | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Touch .env file | ||
run: touch ".env" | ||
|
||
- name: Test docker compose build | ||
run: docker compose build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
name: Docker Image | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ghcr: | ||
name: ${{ github.ref == 'refs/heads/main' && 'Build and Push' || 'Test Build' }} | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Login to ghcr.io | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: ${{ github.ref == 'refs/heads/main' && 'Build and Push' || 'Test Build' }} | ||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6 | ||
with: | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
tags: ghcr.io/biaw/test-area:latest | ||
name: Docker Image | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ghcr: | ||
name: ${{ github.ref == 'refs/heads/main' && 'Build and Push' || 'Test Build' }} | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Login to ghcr.io | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: ${{ github.ref == 'refs/heads/main' && 'Build and Push' || 'Test Build' }} | ||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6 | ||
with: | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
tags: ghcr.io/biaw/test-area:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
name: Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
jest: | ||
name: Jest | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: false | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Mock .env | ||
run: | | ||
echo "CLIENT_TOKEN=hawk" > .env | ||
echo "WORKER_TOKENS=tuah" >> .env | ||
echo "DATABASE_URI=mock" >> .env | ||
echo "OWNER_ID=mock" >> .env | ||
- name: Run Jest | ||
run: pnpm test | ||
name: Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
jest: | ||
name: Jest | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: false | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Mock .env | ||
run: | | ||
echo "CLIENT_TOKEN=hawk" > .env | ||
echo "WORKER_TOKENS=tuah" >> .env | ||
echo "DATABASE_URI=mock" >> .env | ||
echo "OWNER_ID=mock" >> .env | ||
- name: Run Jest | ||
run: pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
FROM node:22-alpine@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9a7b30fdf97 AS base | ||
RUN apk --no-cache add g++ gcc make python3 | ||
WORKDIR /app | ||
|
||
# install prod dependencies | ||
|
||
FROM base AS deps | ||
RUN corepack enable pnpm | ||
|
||
COPY package.json ./ | ||
COPY pnpm-lock.yaml ./ | ||
|
||
RUN pnpm install --frozen-lockfile --prod | ||
|
||
|
||
# install all dependencies and build typescript | ||
|
||
FROM deps AS ts-builder | ||
RUN pnpm install --frozen-lockfile | ||
|
||
COPY tsconfig.json ./ | ||
COPY ./src ./src | ||
RUN pnpm run build | ||
|
||
|
||
# production image | ||
|
||
FROM base | ||
|
||
COPY .env* ./ | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY --from=ts-builder /app/build ./build | ||
COPY package.json ./ | ||
|
||
ENV NODE_ENV=production | ||
ENTRYPOINT [ "npm", "run" ] | ||
CMD [ "start" ] | ||
FROM node:22-alpine@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9a7b30fdf97 AS base | ||
RUN apk --no-cache add g++ gcc make python3 | ||
WORKDIR /app | ||
|
||
# install prod dependencies | ||
|
||
FROM base AS deps | ||
RUN corepack enable pnpm | ||
|
||
COPY package.json ./ | ||
COPY pnpm-lock.yaml ./ | ||
|
||
RUN pnpm install --frozen-lockfile --prod | ||
|
||
|
||
# install all dependencies and build typescript | ||
|
||
FROM deps AS ts-builder | ||
RUN pnpm install --frozen-lockfile | ||
|
||
COPY tsconfig.json ./ | ||
COPY ./src ./src | ||
RUN pnpm run build | ||
|
||
|
||
# production image | ||
|
||
FROM base | ||
|
||
COPY .env* ./ | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY --from=ts-builder /app/build ./build | ||
COPY package.json ./ | ||
|
||
ENV NODE_ENV=production | ||
ENTRYPOINT [ "npm", "run" ] | ||
CMD [ "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Promise Solutions | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
MIT License | ||
Copyright (c) Promise Solutions | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
services: | ||
bot: | ||
build: . | ||
restart: always | ||
environment: | ||
- CLIENT_TOKEN=$CLIENT_TOKEN | ||
- WORKER_TOKENS=$WORKER_TOKENS | ||
- DATABASE_URI=mongodb://db | ||
- OWNER_ID=$OWNER_ID | ||
- THEME_COLOR=$THEME_COLOR | ||
- AREA_LIMIT_PER_USER=$AREA_LIMIT_PER_USER | ||
- DISABLE_FUNNY_WORKER_NAMES=$DISABLE_FUNNY_WORKER_NAMES | ||
volumes: | ||
- ./logs:/app/logs | ||
depends_on: | ||
- db | ||
db: | ||
image: mongo:8@sha256:4f93a84f7d4d8b1b6cb7e0c172d8a44b0bed9b399f207165ea19473bdb5a36b0 | ||
restart: always | ||
volumes: | ||
- ./database:/data/db | ||
services: | ||
bot: | ||
build: . | ||
restart: always | ||
environment: | ||
- CLIENT_TOKEN=$CLIENT_TOKEN | ||
- WORKER_TOKENS=$WORKER_TOKENS | ||
- DATABASE_URI=mongodb://db | ||
- OWNER_ID=$OWNER_ID | ||
- THEME_COLOR=$THEME_COLOR | ||
- AREA_LIMIT_PER_USER=$AREA_LIMIT_PER_USER | ||
- DISABLE_FUNNY_WORKER_NAMES=$DISABLE_FUNNY_WORKER_NAMES | ||
volumes: | ||
- ./logs:/app/logs | ||
depends_on: | ||
- db | ||
db: | ||
image: mongo:8@sha256:4f93a84f7d4d8b1b6cb7e0c172d8a44b0bed9b399f207165ea19473bdb5a36b0 | ||
restart: always | ||
volumes: | ||
- ./database:/data/db |
Oops, something went wrong.