-
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.
Merge pull request #34 from J-Hoplin/dev
Production 0127
- Loading branch information
Showing
88 changed files
with
3,224 additions
and
355 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,27 @@ | ||
# Environment variables declared in this file are automatically made available to Prisma. | ||
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema | ||
|
||
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. | ||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings | ||
|
||
DATABASE_URL="mysql://root:hoplin1234!@db:3306/judge?schema=public" | ||
|
||
ADMIN_EMAIL="hoplin.dev@gmail.com" | ||
ADMIN_PW = "admin" | ||
|
||
JWT_SECRET="SECRET" | ||
|
||
JUDGE_SERVER_ENDPOINT="" | ||
|
||
ENV="" | ||
PORT="" | ||
|
||
# AWS | ||
AWS_REGION="" | ||
AWS_ACCESS_ID="" | ||
AWS_ACCESS_SECRET="" | ||
AWS_SQS_QUEUE="" | ||
AWS_S3_BUCKET="" | ||
|
||
# Sentry | ||
SENTRY_DSN="" |
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
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,58 @@ | ||
name: CI-Production-Dockerize | ||
on: | ||
push: | ||
branches: | ||
- production | ||
run-name: Dockerize of production version. Triggerd by ${{github.actor}} | ||
jobs: | ||
dockerize: | ||
name: Dockerize and upload | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout repository code | ||
- name: Repository Checkout | ||
uses: actions/checkout@v4 | ||
# Set Node.js version environment | ||
- name: Node.js version 18 Environment setting | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
# Install dependencies | ||
- name: Install Dependencies | ||
run: npm install --force | ||
- name: Check Build Status | ||
run: npm run build | ||
- name: Setup QEMU for multiplatform build | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Setup docker buildx and set platform | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Docker Login | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USERNAME}} | ||
password: ${{secrets.DOCKERHUB_TOKEN}} | ||
- id: build-n-push | ||
name: Build and Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: hoplin-dev/online-judge:latest | ||
platforms: linux/amd64,linux/arm64 | ||
- name: 'Discord Alert - Success' | ||
if: steps.build-n-push.outcome == 'success' | ||
uses: rjstone/discord-webhook-notify@v1 | ||
with: | ||
severity: info | ||
details: 'Docker Deploy Success (linux/amd64, linux/arm64)' | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
- name: 'Discord Alert - Fail' | ||
if: steps.build-n-push.outcome != 'success' | ||
uses: rjstone/discord-webhook-notify@v1 | ||
with: | ||
severity: error | ||
details: 'Docker Deploy Failed' | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
- name: 'Fail check' | ||
if: steps.build-n-push.outcome != 'success' | ||
run: exit1 |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash | ||
|
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,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Do not modify | ||
node node_modules/prisma/build/index.js generate |
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 @@ | ||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:3000; | ||
} | ||
} |
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 @@ | ||
keepalive_timeout 120; |
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
Oops, something went wrong.