Skip to content

Commit 2e55f45

Browse files
authored
Replace Nuxt/Express with Sveltekit/Fastify PR #2
2 parents 2bb8cc5 + 111ffef commit 2e55f45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+7872
-11726
lines changed

.dockerignore

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
node_modules
2-
.env.example
3-
.nuxt
4-
build.sh
5-
docker-compose-live.yml
1+
**/node_modules
2+
.env
3+
./apps/webstack/.env
4+
./apps/discordbot/.env
5+
out
6+
**/build
7+
**/.svelte-kit
8+
**/Dockerfile
9+
docker-compose-live.yml
10+
build-bot.sh
11+
build-web.sh
12+
.npmrc

.env.example

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
DISCORD_GUILD_ID=
21
DISCORD_CLIENT_ID=
2+
PUBLIC_DISCORD_CALLBACK_URL=
33
DISCORD_CLIENT_SECRET=
4-
DISCORD_CALLBACK_URL=
54
DISCORD_BOT_TOKEN=
6-
OSU2_CLIENT_ID=
5+
DISCORD_GUILD_ID=
6+
PUBLIC_OSU2_CLIENT_ID=
77
OSU2_CLIENT_SECRET=
8-
OSU2_CALLBACK_URL=
9-
COOKIE_SECURE=1
10-
COOKIE_SECRET=keyboard_cat
11-
REDIS_HOST=
12-
REDIS_PORT=
8+
PUBLIC_OSU2_CALLBACK_URL=
9+
PRIVATE_COOKIE_SECRET=

.eslintrc

Lines changed: 0 additions & 70 deletions
This file was deleted.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Build and push images for osu! tournament hub deployments
2+
3+
on:
4+
push:
5+
branches: ["oth-live"]
6+
7+
env:
8+
# Use docker.io for Docker Hub if empty
9+
REGISTRY: amu.subject.moe
10+
# github.repository as <account>/<repo>
11+
WEB_IMAGE: cosette-lite
12+
BOT_IMAGE: cosette-bot
13+
GITLAB_USER: subject
14+
15+
jobs:
16+
build-web:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Setup Docker buildx
23+
uses: docker/setup-buildx-action@v2
24+
25+
# Login against a Docker registry except on PR
26+
# https://github.com/docker/login-action
27+
- name: Log into registry ${{ env.REGISTRY }}
28+
if: github.event_name != 'pull_request'
29+
uses: docker/login-action@v2
30+
with:
31+
registry: ${{ env.REGISTRY }}
32+
username: ${{ env.GITLAB_USER }}
33+
password: ${{ secrets.GITLAB_REGISTRY_TOKEN }}
34+
35+
# Extract metadata (tags, labels) for Docker
36+
# https://github.com/docker/metadata-action
37+
- name: Extract Docker metadata
38+
id: meta
39+
uses: docker/metadata-action@v4.3.0
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.GITLAB_USER }}/oth-verification/${{ env.WEB_IMAGE }}
42+
43+
# Build and push Docker image with Buildx (don't push on PR)
44+
# https://github.com/docker/build-push-action
45+
- name: Build and push Docker image
46+
id: build-and-push
47+
uses: docker/build-push-action@v4
48+
with:
49+
context: .
50+
file: ./apps/webstack/Dockerfile
51+
push: ${{ github.event_name != 'pull_request' }}
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}
54+
55+
build-bot:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v3
60+
61+
- name: Setup Docker buildx
62+
uses: docker/setup-buildx-action@v2
63+
64+
# Login against a Docker registry except on PR
65+
# https://github.com/docker/login-action
66+
- name: Log into registry ${{ env.REGISTRY }}
67+
if: github.event_name != 'pull_request'
68+
uses: docker/login-action@v2
69+
with:
70+
registry: ${{ env.REGISTRY }}
71+
username: ${{ env.GITLAB_USER }}
72+
password: ${{ secrets.GITLAB_REGISTRY_TOKEN }}
73+
74+
# Extract metadata (tags, labels) for Docker
75+
# https://github.com/docker/metadata-action
76+
- name: Extract Docker metadata
77+
id: meta
78+
uses: docker/metadata-action@v4.3.0
79+
with:
80+
images: ${{ env.REGISTRY }}/${{ env.GITLAB_USER }}/oth-verification/${{ env.BOT_IMAGE }}
81+
82+
# Build and push Docker image with Buildx (don't push on PR)
83+
# https://github.com/docker/build-push-action
84+
- name: Build and push Docker image
85+
id: build-and-push
86+
uses: docker/build-push-action@v4
87+
with:
88+
context: .
89+
file: ./apps/discordbot/Dockerfile
90+
push: ${{ github.event_name != 'pull_request' }}
91+
tags: ${{ steps.meta.outputs.tags }}
92+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ typings/
6262
# parcel-bundler cache (https://parceljs.org/)
6363
.cache
6464

65-
# next.js build output
66-
.next
67-
68-
# nuxt.js build output
69-
.nuxt
70-
71-
# Nuxt generate
72-
dist
73-
74-
# vuepress build output
75-
.vuepress/dist
76-
77-
# Serverless directories
78-
.serverless
79-
8065
# IDE / Editor
8166
.idea
8267

@@ -89,6 +74,12 @@ sw.*
8974
# Vim swap files
9075
*.swp
9176

92-
.env
77+
*/.env
78+
*/.env.backup
9379
server/cert/*.pem
94-
docker-compose-live.yml
80+
*docker-compose-live.yml
81+
.svelte-kit
82+
build/
83+
config.json
84+
*out
85+
docker-compose-staging.yml

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict=true
2+
use-node-version=18.13.0

.vscode/launch.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)