-
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.
- Loading branch information
Showing
9 changed files
with
126 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
# Panda css | ||
styled-system/ | ||
|
||
Dockerfile |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Docker | ||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: "Build" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }} | ||
platforms: linux/amd64 | ||
file: Dockerfile | ||
tags: | | ||
ghcr.io/csesoc/maintenance-site:${{ github.sha }} | ||
ghcr.io/csesoc/maintenance-site:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM node:20-slim AS base | ||
RUN npm i -g bun | ||
|
||
FROM base AS deps | ||
WORKDIR /app | ||
COPY package.json bun.lockb ./ | ||
RUN bun i --frozen-lockfile | ||
|
||
FROM base AS builder | ||
|
||
WORKDIR /app | ||
COPY package.json bun.lockb ./ | ||
RUN bun i --frozen-lockfile | ||
COPY . . | ||
|
||
RUN bun run build | ||
|
||
FROM oven/bun | ||
WORKDIR /app | ||
COPY --from=builder /app/build . | ||
COPY --from=deps /app/node_modules node_modules/ | ||
|
||
COPY package.json . | ||
EXPOSE 3000 | ||
ENV NODE_ENV=production | ||
|
||
CMD [ "bun", "index.js" ] |
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { redirect } from "@sveltejs/kit"; | ||
import type { LayoutServerLoad } from "./$types"; | ||
|
||
export const load: LayoutServerLoad = (p) => { | ||
console.log(p.url.pathname); | ||
if (p.url.pathname !== "/") throw redirect(307, "/"); | ||
}; |
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,6 +1,5 @@ | ||
<script lang="ts"> | ||
import "../app.css"; | ||
export const prerender = true; | ||
import "../app.css"; | ||
</script> | ||
|
||
<slot /> | ||
<slot /> |
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,6 +1,33 @@ | ||
<script lang="ts"> | ||
import { } from "@/styles/typography"; | ||
import { css } from "styled-system/css"; | ||
</script> | ||
|
||
<h1>Welcome to SvelteKit</h1> | ||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> | ||
<svelte:head> | ||
<title>🚧 Page Under Maintenance</title> | ||
<meta | ||
name="description" | ||
content="This page is currently under maintenance. We're sorry; please check back again soon!" | ||
/> | ||
</svelte:head> | ||
|
||
<div | ||
class={css({ | ||
height: "100vh", | ||
width: "100vw", | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "start", | ||
flexDirection: "column", | ||
p: "4rem", | ||
|
||
maxWidth: "600px", | ||
m: "0 auto", | ||
})} | ||
> | ||
<h1 class={css({ pb: "1rem" })}>🚧 Page under maintenance</h1> | ||
<h2 class={css({ pb: "1rem" })}> | ||
🏗️ CSESoc's platform team is currently | ||
<span class={css({ color: "violet.300" })}>performing maintenance</span>. | ||
</h2> | ||
<h3>😰 We're sorry about the inconvenience; please check back again later!</h3> | ||
</div> |
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