-
Notifications
You must be signed in to change notification settings - Fork 2
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 #127 from boostcampwm2023/release-0.0.1
Release 0.0.1
- Loading branch information
Showing
158 changed files
with
23,536 additions
and
33 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,78 @@ | ||
name: "backend-docker-build" | ||
|
||
on: | ||
push: | ||
branches: [ "dev-be" ] | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# ๋ ธ๋ ๋ฒ์ ์ค์ ๋ฐ ์์กด์ฑ ์ค์น | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.17.1' | ||
|
||
- name: Corepack Enable | ||
run: corepack enable | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
# ํ ์คํธ ์คํ (ํ์ํ ๊ฒฝ์ฐ) | ||
# - name: Run Tests | ||
# run: yarn test | ||
|
||
docker: | ||
name: Deploy Docker Image | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and Push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: ./packages/backend/Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-backend:0.1 | ||
|
||
deploy: | ||
name: Deploy Backend | ||
runs-on: ubuntu-latest | ||
needs: docker | ||
steps: | ||
- name: SSH and Deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.BACKEND_SSH_HOST }} | ||
username: ${{ secrets.BACKEND_SSH_USERNAME }} | ||
password: ${{ secrets.BACKEND_SSH_PASSWORD }} | ||
port: ${{ secrets.BACKEND_SSH_PORT }} | ||
script: | | ||
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-backend:0.1 | ||
docker rm -f backend || true | ||
docker run -d --name backend -p 8080:8080 \ | ||
-v /${{ secrets.CONTAINER_SSH_USERNAME }}/backend-logs:/app/packages/backend/logs/ \ | ||
-e CONTAINER_SSH_HOST=${{ secrets.CONTAINER_SSH_HOST }} \ | ||
-e CONTAINER_SSH_PORT=${{ secrets.CONTAINER_SSH_PORT }} \ | ||
-e CONTAINER_SSH_USERNAME=${{ secrets.CONTAINER_SSH_USERNAME }} \ | ||
-e CONTAINER_SSH_PASSWORD=${{ secrets.CONTAINER_SSH_PASSWORD }} \ | ||
-e MONGODB_HOST=${{ secrets.MONGODB_HOST }} \ | ||
${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-backend:0.1 |
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,73 @@ | ||
name: "frontend-docker-build" | ||
|
||
on: | ||
push: | ||
branches: [ "dev-fe" ] | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# ๋ ธ๋ ๋ฒ์ ์ค์ ๋ฐ ์์กด์ฑ ์ค์น | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.17.1' | ||
|
||
- name: Corepack Enable | ||
run: corepack enable | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Build | ||
run: | | ||
cd packages/frontend | ||
yarn build | ||
docker: | ||
name: Deploy Docker Image | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and Push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: ./packages/frontend/Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-frontend:0.1 | ||
|
||
deploy: | ||
name: Deploy Frontend | ||
runs-on: ubuntu-latest | ||
needs: docker | ||
steps: | ||
- name: SSH and Deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.BACKEND_SSH_HOST }} | ||
username: ${{ secrets.BACKEND_SSH_USERNAME }} | ||
password: ${{ secrets.BACKEND_SSH_PASSWORD }} | ||
port: ${{ secrets.BACKEND_SSH_PORT }} | ||
script: | | ||
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-frontend:0.1 | ||
docker rm -f frontend || true | ||
docker run -d --name frontend -p 3000:3000 \ | ||
${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-frontend:0.1 |
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 |
---|---|---|
|
@@ -18,3 +18,6 @@ | |
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
.eslintcache | ||
|
||
.env |
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,14 @@ | ||
#!/usr/bin/env sh | ||
|
||
# ํ์ฌ ๋ธ๋์น์ ์ด๋ฆ์ ๊ฐ์ ธ์ค๊ธฐ | ||
current_branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if echo "$current_branch" | grep -q "fe"; then | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
yarn workspace frontend run lint-staged | ||
fi | ||
|
||
if echo "$current_branch" | grep -q "be"; then | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
yarn workspace backend run lint-staged | ||
fi |
Binary file not shown.
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,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/bin/eslint.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real eslint/bin/eslint.js your application uses | ||
module.exports = absRequire(`eslint/bin/eslint.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real eslint your application uses | ||
module.exports = absRequire(`eslint`); |
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,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/use-at-your-own-risk | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real eslint/use-at-your-own-risk your application uses | ||
module.exports = absRequire(`eslint/use-at-your-own-risk`); |
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,14 @@ | ||
{ | ||
"name": "eslint", | ||
"version": "8.53.0-sdk", | ||
"main": "./lib/api.js", | ||
"type": "commonjs", | ||
"bin": { | ||
"eslint": "./bin/eslint.js" | ||
}, | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": "./lib/api.js", | ||
"./use-at-your-own-risk": "./lib/unsupported-api.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"eslint": "^8.53.0", | ||
"husky": "^8.0.0", | ||
"pinst": "^3.0.0", | ||
"prettier": "^3.1.0", | ||
|
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,26 @@ | ||
# ๋ฒ์ ๊ด๋ฆฌ ์์คํ | ||
.git | ||
.gitignore | ||
|
||
# ๋ ธ๋ ๋ชจ๋ | ||
node_modules | ||
|
||
# ๋ก๊ทธ ํ์ผ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# ๋น๋ ๋๋ ํ ๋ฆฌ | ||
dist | ||
build | ||
|
||
# ๊ฐ๋ฐ ๋๊ตฌ ์ค์ | ||
.editorconfig | ||
*.env | ||
*.env.local | ||
*.env.development.local | ||
*.env.test.local | ||
*.env.production.local | ||
|
||
# OS ๊ด๋ จ ํ์ผ | ||
.DS_Store | ||
Thumbs.db |
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,25 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}; |
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,39 @@ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
.env | ||
|
||
*.sqlite |
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 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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,12 @@ | ||
FROM node:18.17.1 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN corepack enable | ||
RUN yarn install | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["sh", "-c", "cd packages/backend && yarn run start"] |
Oops, something went wrong.