Skip to content

Commit 2a748a9

Browse files
committed
dockerize and modify option categories
1 parent d532d16 commit 2a748a9

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Docker Build
2+
on: [push, pull_request]
3+
4+
permissions:
5+
contents: read
6+
packages: write
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Docker Build
13+
id: build
14+
uses: luludotdev/docker-build@master
15+
with:
16+
image-name: yatb-site
17+
token: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM node:22-alpine AS base
2+
FROM base AS builder
3+
4+
WORKDIR /app
5+
COPY package.json package-lock.json tsconfig.json ./
6+
RUN npm ci
7+
8+
COPY src/ src/
9+
RUN npm run build
10+
11+
FROM base AS deps
12+
WORKDIR /app
13+
COPY package.json package-lock.json ./
14+
RUN npm ci --omit=dev
15+
16+
FROM base
17+
WORKDIR /app
18+
19+
RUN \
20+
addgroup --system --gid 1001 nodejs && \
21+
adduser --system --uid 1001 nodejs
22+
23+
COPY --chown=1001:1001 assets/ ./assets
24+
COPY --chown=1001:1001 package.json ./
25+
COPY --chown=1001:1001 --from=deps /app/node_modules ./node_modules
26+
COPY --chown=1001:1001 --from=builder /app/build ./build
27+
28+
USER nodejs
29+
EXPOSE 3000
30+
ENV NODE_ENV=production
31+
ENV IS_DOCKER=true
32+
33+
CMD ["npm", "run", "start"]

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ <h1 class="text-3xl font-bold text-white">BSMG Ticket Transcripts</h1>
2727
placeholder="Search for username..." />
2828
<select id="filter-type"
2929
class="bg-gray-800 text-white rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-indigo-600">
30-
<option value="">Filter by Type</option>
30+
<option value="Ban">Ban</option>
31+
<option value="Mute">Mute</option>
32+
<option value="Unhelpable">Unhelpable</option>
33+
<option value="Unrequestable">Unrequestable</option>
3134
<!-- Add more options and values here to your needs -->
3235
</select>
3336
</div>

0 commit comments

Comments
 (0)