Skip to content
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
28 changes: 20 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
services:
frontend:
build:
context: ./frontend/spec-trackr-app # Dockerfile이 위치한 경로
dockerfile: frontend.dockerfile # 사용할 Dockerfile 이름

container_name: react_frontend # 컨테이너 이름 지정
spec-trackr:
build:
context: ./frontend/spec-trackr-app
dockerfile: sta.dockerfile
ports:
- "3001:3001" # 고정 포트 매핑
networks:
- spec-net

spectrackr-main:
build:
context: ./frontend/spectrackr-main
dockerfile: main.dockerfile
ports:
- "3002:80" # 로컬 머신의 3002 포트를 컨테이너의 80번 포트에 연결
- "3003:3003" # 고정 포트 매핑
networks:
- spec-net
depends_on:
- spec-trackr

restart: unless-stopped # 컨테이너가 중지되었을 때 수동으로 중지하지 않은 경우 자동 재시작
networks:
spec-net:
driver: bridge
24 changes: 0 additions & 24 deletions frontend/spec-trackr-app/frontend.dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion frontend/spec-trackr-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import ComSp from "./com_sp";
import "./index.css";
import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css';
Expand Down
8 changes: 8 additions & 0 deletions frontend/spec-trackr-app/sta.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV HOST=0.0.0.0 BROWSER=none PORT=3001
EXPOSE 3001
CMD ["npm", "start"]
4 changes: 2 additions & 2 deletions frontend/spectrackr-main/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function HomePage() {
transition={{ duration: 0.5, delay: 0.2 }}
>
<Button
onClick={() => { window.location.href = "http://localhost:3000" }}
onClick={() => { window.location.href = "http://localhost:3001" }}
className="bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600 text-white shadow-lg"
>
시작하기 <ChevronRight className="ml-2 h-4 w-4" />
Expand Down Expand Up @@ -359,7 +359,7 @@ function HomePage() {
</h3>

<Button
onClick={() => { window.location.href = "http://localhost:3000" }}
onClick={() => { window.location.href = "http://localhost:3001" }}
size="lg"
className="mt-8 bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600 text-lg text-white shadow-lg"
>
Expand Down
8 changes: 8 additions & 0 deletions frontend/spectrackr-main/main.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV HOST=0.0.0.0 PORT=3003
EXPOSE 3003
CMD ["npm", "run", "dev"]