Skip to content

Commit

Permalink
Merge branch 'dev' into #156-move-rooms-to-the-past-room-list-and-cha…
Browse files Browse the repository at this point in the history
…nge-settlestatus-automatically-when-the-participant-is-one
  • Loading branch information
14KGun authored Jan 7, 2023
2 parents 36136a6 + 8f8f3ae commit 739cdcc
Show file tree
Hide file tree
Showing 17 changed files with 627 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/node_modules
.env.test
.env.production
.env.development
.DS_store
*.code-workspace
*.swp
/logs/*.log

# AdminJS 관련 디렉토리
.adminjs
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ FRONT_URL=[front url(e.g. http://localhost:3000)]
AWS_ACCESS_KEY_ID=[AWS Access key ID]
AWS_SECRET_ACCESS_KEY=[AWS Secret access key]
AWS_S3_BUCKET_NAME=[AWS S3 Buck name]
JWT_SECRET_KEY=[JWT SERCRET KEY]
APP_URI_SCHEME=[APP_URI_SCHEME]
2 changes: 1 addition & 1 deletion .github/workflows/push_image_ecr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push Image to Amazon ECR
name: Push Prod Image to Amazon ECR

# when tagging action success
on:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/push_image_ecr_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Push Dev Image to Amazon ECR
on:
pull_request:
types:
- closed
branches:
- dev

env:
AWS_REGION: ap-northeast-2

jobs:
if_merged:
if: github.event.pull_request.merged == true
name: Create Release and Tag
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build and Push to AWS ECR
id: build_image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: taxi-back
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:dev .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
echo "Push iamge : $ECR_REGISTRY/$ECR_REPOSITORY:dev"
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ FROM node:16-alpine
WORKDIR /usr/src/app
COPY . .

# Install curl (for taxi-docker)
RUN apk update && apk add curl

# Install requirements
RUN npm ci

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ See [contributors](https://github.com/sparcs-kaist/taxi-front/graphs/contributor
- frontend : https://github.com/sparcs-kaist/taxi-front
- backend : https://github.com/sparcs-kaist/taxi-back
- app : https://github.com/sparcs-kaist/taxi-app
- docker : https://github.com/sparcs-kaist/taxi-docker
- figma : https://www.figma.com/file/li34hP1oStJAzLNjcG5KjN/SPARCS-Taxi?node-id=0%3A1
- taxiSampleGenerator : https://github.com/sparcs-kaist/taxiSampleGenerator
188 changes: 188 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"express-session": "^1.17.1",
"express-socket.io-session": "^1.3.5",
"express-validator": "^6.14.0",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.5.2",
"querystring": "^0.2.1",
"redis": "^4.2.0",
Expand Down
2 changes: 2 additions & 0 deletions security.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ module.exports = {
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
s3BucketName: process.env.AWS_S3_BUCKET_NAME,
},
jwtSecretKey: process.env.JWT_SECRET_KEY,
appUriScheme: process.env.APP_URI_SCHEME,
};
7 changes: 7 additions & 0 deletions src/config/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const TOKEN_EXPIRED = -3;
const TOKEN_INVALID = -2;

module.exports = {
TOKEN_INVALID,
TOKEN_EXPIRED,
};
9 changes: 9 additions & 0 deletions src/config/secretKey.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { jwtSecretKey, frontUrl } = require("../../security");

module.exports = {
jwtSecretKey: jwtSecretKey,
option: {
algorithm: "HS256",
issuer: frontUrl,
},
};
Loading

0 comments on commit 739cdcc

Please sign in to comment.