Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 시그널링 노드 서버 메인으로 병합 #377

Merged
merged 18 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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