Skip to content

Commit 739cdcc

Browse files
authored
Merge branch 'dev' into #156-move-rooms-to-the-past-room-list-and-change-settlestatus-automatically-when-the-participant-is-one
2 parents 36136a6 + 8f8f3ae commit 739cdcc

17 files changed

+627
-7
lines changed

.dockerignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/node_modules
2+
.env.test
3+
.env.production
4+
.env.development
5+
.DS_store
6+
*.code-workspace
7+
*.swp
8+
/logs/*.log
9+
10+
# AdminJS 관련 디렉토리
11+
.adminjs

.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ FRONT_URL=[front url(e.g. http://localhost:3000)]
88
AWS_ACCESS_KEY_ID=[AWS Access key ID]
99
AWS_SECRET_ACCESS_KEY=[AWS Secret access key]
1010
AWS_S3_BUCKET_NAME=[AWS S3 Buck name]
11+
JWT_SECRET_KEY=[JWT SERCRET KEY]
12+
APP_URI_SCHEME=[APP_URI_SCHEME]

.github/workflows/push_image_ecr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Push Image to Amazon ECR
1+
name: Push Prod Image to Amazon ECR
22

33
# when tagging action success
44
on:
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Push Dev Image to Amazon ECR
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- dev
8+
9+
env:
10+
AWS_REGION: ap-northeast-2
11+
12+
jobs:
13+
if_merged:
14+
if: github.event.pull_request.merged == true
15+
name: Create Release and Tag
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Configure AWS credentials
25+
uses: aws-actions/configure-aws-credentials@v1
26+
with:
27+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
28+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29+
aws-region: ${{ env.AWS_REGION }}
30+
31+
- name: Login to AWS ECR
32+
id: login-ecr
33+
uses: aws-actions/amazon-ecr-login@v1
34+
35+
- name: Build and Push to AWS ECR
36+
id: build_image
37+
env:
38+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
39+
ECR_REPOSITORY: taxi-back
40+
run: |
41+
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:dev .
42+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
43+
echo "Push iamge : $ECR_REGISTRY/$ECR_REPOSITORY:dev"

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ FROM node:16-alpine
44
WORKDIR /usr/src/app
55
COPY . .
66

7+
# Install curl (for taxi-docker)
8+
RUN apk update && apk add curl
9+
710
# Install requirements
811
RUN npm ci
912

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ See [contributors](https://github.com/sparcs-kaist/taxi-front/graphs/contributor
4444
- frontend : https://github.com/sparcs-kaist/taxi-front
4545
- backend : https://github.com/sparcs-kaist/taxi-back
4646
- app : https://github.com/sparcs-kaist/taxi-app
47+
- docker : https://github.com/sparcs-kaist/taxi-docker
4748
- figma : https://www.figma.com/file/li34hP1oStJAzLNjcG5KjN/SPARCS-Taxi?node-id=0%3A1
4849
- taxiSampleGenerator : https://github.com/sparcs-kaist/taxiSampleGenerator

package-lock.json

+188
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"express-session": "^1.17.1",
2323
"express-socket.io-session": "^1.3.5",
2424
"express-validator": "^6.14.0",
25+
"jsonwebtoken": "^8.5.1",
2526
"mongoose": "^6.5.2",
2627
"querystring": "^0.2.1",
2728
"redis": "^4.2.0",

security.js

+2
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ module.exports = {
1616
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
1717
s3BucketName: process.env.AWS_S3_BUCKET_NAME,
1818
},
19+
jwtSecretKey: process.env.JWT_SECRET_KEY,
20+
appUriScheme: process.env.APP_URI_SCHEME,
1921
};

src/config/constants.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const TOKEN_EXPIRED = -3;
2+
const TOKEN_INVALID = -2;
3+
4+
module.exports = {
5+
TOKEN_INVALID,
6+
TOKEN_EXPIRED,
7+
};

src/config/secretKey.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const { jwtSecretKey, frontUrl } = require("../../security");
2+
3+
module.exports = {
4+
jwtSecretKey: jwtSecretKey,
5+
option: {
6+
algorithm: "HS256",
7+
issuer: frontUrl,
8+
},
9+
};

0 commit comments

Comments
 (0)