9890b906b9
User confirmed test_dev is the correct database for invyone (the old TEST-VEX project), matching what the previous mac compose was using. Same host (211.115.91.141:11134), same credentials, just a different database name. Verified end-to-end: real login (POST /api/auth/login from the browser path) returns 200 with a valid JWT, meaning the full chain browser → next dev rewrites → backend-spring → HikariCP → test_dev works and the user table lookup + password check both pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
86 lines
2.8 KiB
YAML
86 lines
2.8 KiB
YAML
# invyone (= 옛 TEST-VEX, React + Java 풀스택) 도커 컴포즈
|
|
# 사무실 우분투 호스팅용. restart unless-stopped 로 항상 떠있게.
|
|
#
|
|
# 외부 노출 포트:
|
|
# - frontend : 9772
|
|
# - backend-spring : 8083
|
|
#
|
|
# 컨테이너 내부 포트는 각 앱의 기본값 유지 (3000 / 8081)
|
|
# 모드: dev (volume mount + 자동 리로드). 코드 변경은 syncthing 통해 동기화됨.
|
|
#
|
|
# 띄우기:
|
|
# cd ~/invyone && docker compose -f docker/dev/docker-compose.invyone.yml up -d
|
|
#
|
|
# 끄기:
|
|
# cd ~/invyone && docker compose -f docker/dev/docker-compose.invyone.yml down
|
|
|
|
services:
|
|
# ========================
|
|
# Spring Boot 백엔드
|
|
# ========================
|
|
backend-spring:
|
|
build:
|
|
context: ../../backend-spring
|
|
dockerfile: ../docker/dev/backend-spring.Dockerfile
|
|
container_name: invyone-backend-spring
|
|
ports:
|
|
- "8083:8081"
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: dev
|
|
SERVER_PORT: 8081
|
|
# test_dev DB (211.115.91.141:11134)
|
|
SPRING_DATASOURCE_URL: jdbc:postgresql://211.115.91.141:11134/test_dev
|
|
SPRING_DATASOURCE_USERNAME: postgres
|
|
SPRING_DATASOURCE_PASSWORD: vexplor0909!!
|
|
JWT_SECRET: ilshin-plm-super-secret-jwt-key-2024
|
|
JWT_EXPIRATION: "86400000"
|
|
FILE_UPLOAD_DIR: ./uploads
|
|
volumes:
|
|
- ../../backend-spring:/app
|
|
networks:
|
|
- invyone-net
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
# actuator 미설치 + spring security 가 / 와 /health 모두 403 처리.
|
|
# 컨테이너 내부에서 8081 포트로 응답이 오기만 하면 (status 무관) OK 로 간주.
|
|
test: ["CMD-SHELL", "curl -sS -o /dev/null http://localhost:8081/ || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 120s
|
|
|
|
# ========================
|
|
# Next.js 프론트엔드
|
|
# ========================
|
|
frontend:
|
|
build:
|
|
context: ../../frontend
|
|
dockerfile: ../docker/dev/frontend.Dockerfile
|
|
container_name: invyone-frontend
|
|
ports:
|
|
- "9772:3000"
|
|
environment:
|
|
NODE_ENV: development
|
|
# 브라우저는 상대경로로 호출 → next dev server가 rewrites 로 컨테이너 내부 backend 로 프록시
|
|
# (절대 URL 박으면 호스트/IP 가 머신마다 달라서 다른 머신에서 접속 시 깨짐)
|
|
NEXT_PUBLIC_API_URL: /api
|
|
# 서버사이드(SSR/rewrites)에서 backend 호출용 — 컨테이너 네트워크 내부 이름
|
|
SERVER_API_URL: http://invyone-backend-spring:8081
|
|
NODE_OPTIONS: --max-old-space-size=8192
|
|
NEXT_TELEMETRY_DISABLED: "1"
|
|
WATCHPACK_POLLING: "true"
|
|
volumes:
|
|
- ../../frontend:/app
|
|
- /app/node_modules
|
|
- /app/.next
|
|
depends_on:
|
|
- backend-spring
|
|
networks:
|
|
- invyone-net
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
invyone-net:
|
|
name: invyone-net
|
|
driver: bridge
|