Skip to content

Commit

Permalink
[BE] 시그널링 노드 서버 메인으로 병합 (#377)
Browse files Browse the repository at this point in the history
* feat: Signaling 노드 서버 초기 세팅

* ci: signaling-node-server ci 및 Dockerfile 작성

* ci: babel 의존성 에러 수정

* ci: babel 의존성 에러 수정

* feat: 로그 찍기

* feat: 시그널링 로직 변경

* feat: 인자 객체로 변경

* feat: 객체 필드 변경

* feat: 응답 객체로 변경

* fix: 인자 변경

* fix: 인자 변경

* feat: 로직 수정

* feat: 로그 찍기

* refactor: mesh 구조를 변경합니다.

* fix: port 번호 변경

* feat: eureka등록

* fix: disabled 제거

* fix: eureka config 변경

---------

Co-authored-by: soeun2537 <soeun2537@gmail.com>
  • Loading branch information
Zero-1016 and soeun2537 authored Feb 27, 2025
1 parent 1c6be20 commit 0bd725d
Show file tree
Hide file tree
Showing 9 changed files with 5,703 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/signaling-node-server-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Push Server Image

on:
push:
branches:
- dev/signaling-node-server # 서버 별로 변경 필요
pull_request:
branches:
- dev/signaling-node-server # 서버 별로 변경 필요

jobs:
build-and-push:
runs-on: ubuntu-latest

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
SERVER_NAME: signaling-node-server # 서버 별로 변경 필요

strategy:
matrix:
node-version: ['18.x', '20.x']

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
run: |
cd src/backend/${{ env.SERVER_NAME }}
docker build -t ${{ env.DOCKERHUB_USERNAME }}/${{ env.SERVER_NAME }}:latest .
docker push ${{ env.DOCKERHUB_USERNAME }}/${{ env.SERVER_NAME }}:latest
4 changes: 4 additions & 0 deletions src/backend/signaling-node-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
.DS_Store
/questionImgs
/build
15 changes: 15 additions & 0 deletions src/backend/signaling-node-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:18

WORKDIR /app

COPY package*.json ./

RUN npm install --production

COPY . .

RUN npm run build

EXPOSE 9090

CMD ["npm", "start"]
3 changes: 3 additions & 0 deletions src/backend/signaling-node-server/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
3 changes: 3 additions & 0 deletions src/backend/signaling-node-server/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"exec": "babel-node src/server.js"
}
Loading

0 comments on commit 0bd725d

Please sign in to comment.