🎉 Initial commit - 프로젝트 구조 및 Docker 설정

This commit is contained in:
caadiq 2025-12-31 21:44:40 +09:00
commit 617057727d
6 changed files with 127 additions and 0 deletions

26
.gitignore vendored Normal file
View file

@ -0,0 +1,26 @@
# Dependencies
node_modules/
# Build output
dist/
build/
# Environment variables
.env
.env.local
.env.*.local
# IDE
.vscode/
.idea/
# OS
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
# Cache
.cache/

24
Dockerfile Normal file
View file

@ -0,0 +1,24 @@
# 빌드 스테이지 - 프론트엔드 빌드
FROM node:20-alpine AS frontend-builder
WORKDIR /frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# 프로덕션 스테이지
FROM node:20-alpine
WORKDIR /app
# 백엔드 의존성 설치
COPY backend/package*.json ./
RUN npm install --production
# 백엔드 파일 복사
COPY backend/ ./
# 프론트엔드 빌드 결과물 복사
COPY --from=frontend-builder /frontend/dist ./dist
EXPOSE 80
CMD ["node", "server.js"]

20
README.md Normal file
View file

@ -0,0 +1,20 @@
# fromis_9 Fan Site
프로미스나인 팬사이트입니다.
## 기술 스택
- **Frontend**: React 18 + Vite + TailwindCSS
- **Backend**: Express.js (Node 20)
- **Database**: MariaDB
- **Container**: Docker Compose
## 실행 방법
```bash
docker-compose up -d --build
```
## 도메인
- https://fromis9.caadiq.co.kr

13
backend/package.json Normal file
View file

@ -0,0 +1,13 @@
{
"name": "fromis9-backend",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.18.2",
"mysql2": "^3.11.0"
}
}

16
docker-compose.yml Normal file
View file

@ -0,0 +1,16 @@
services:
fromis9-web:
build: .
container_name: fromis9-web
env_file:
- .env
networks:
- app
- db
restart: unless-stopped
networks:
app:
external: true
db:
external: true

28
frontend/package.json Normal file
View file

@ -0,0 +1,28 @@
{
"name": "fromis9-frontend",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"framer-motion": "^11.0.8",
"lucide-react": "^0.344.0",
"react": "^18.2.0",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.3"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.22",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.18",
"vite": "^5.4.1"
}
}