Initial commit: IT센터 출입자관리시스템 (ACS)
방문자 사전신청·승인, 입·출입 체크인/아웃, QR 배지, 재실현황, 블랙리스트, 대시보드 통계, 방문 리포트(엑셀)까지 7단계 전 기능 구현. - backend: Spring Boot 3.4.5 / Java 21 (JDK 26 빌드), 세션 인증, JPA, H2/PostgreSQL, POI, ZXing, Flyway - frontend: React 19 / Vite 6 / TypeScript - infra: Docker Compose (db·app·web nginx), Flyway V1__init, Python 사용자 시드 - docs: 워크플로우 / 시퀀스 다이어그램(Mermaid) / 이슈·유의사항 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
18
infra/.env.example
Normal file
18
infra/.env.example
Normal file
@@ -0,0 +1,18 @@
|
||||
# ACS (Access Control System) environment — copy to .env and edit
|
||||
|
||||
# Database
|
||||
POSTGRES_USER=acs
|
||||
POSTGRES_PASSWORD=change_me
|
||||
POSTGRES_DB=acs
|
||||
|
||||
# Web (nginx) published port
|
||||
WEB_PORT=80
|
||||
|
||||
# ===== Pass delivery (SMS/LMS) =====
|
||||
# dev : no network — logs the message + writes the QR image to the outbox
|
||||
# hanbank : sends an LMS with the public pass link via the in-house DMZ API
|
||||
ACS_SMS_PROVIDER=dev
|
||||
ACS_SMS_API_URL=http://210.104.132.59:8000
|
||||
# URL the SMS link points to — MUST be reachable from the visitor's phone
|
||||
# (the server's real address/domain, not localhost). e.g. https://acs.example.co.kr
|
||||
ACS_PUBLIC_BASE_URL=http://localhost
|
||||
73
infra/docker-compose.yml
Normal file
73
infra/docker-compose.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:15
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- acs-net
|
||||
|
||||
app:
|
||||
build:
|
||||
context: ../backend
|
||||
dockerfile: Dockerfile
|
||||
image: acs-app:local
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: prod
|
||||
POSTGRES_HOST: db
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
# Pass delivery (dev = log only; hanbank = real LMS via DMZ API)
|
||||
ACS_SMS_PROVIDER: ${ACS_SMS_PROVIDER:-dev}
|
||||
ACS_SMS_API_URL: ${ACS_SMS_API_URL:-http://210.104.132.59:8000}
|
||||
ACS_PUBLIC_BASE_URL: ${ACS_PUBLIC_BASE_URL:-http://localhost}
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- acs-net
|
||||
|
||||
web:
|
||||
build:
|
||||
context: ../frontend
|
||||
dockerfile: Dockerfile
|
||||
image: acs-web:local
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${WEB_PORT:-80}:80"
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- acs-net
|
||||
|
||||
# One-shot user seeder (run manually): docker compose run --rm seed
|
||||
seed:
|
||||
image: python:3.12-slim
|
||||
profiles: ["tools"]
|
||||
working_dir: /work
|
||||
volumes:
|
||||
- ..:/work:rw
|
||||
environment:
|
||||
PGHOST: db
|
||||
PGPORT: 5432
|
||||
PGUSER: ${POSTGRES_USER}
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD}
|
||||
PGDATABASE: ${POSTGRES_DB}
|
||||
entrypoint: ["/bin/sh", "-c"]
|
||||
command: ["pip install -q -r scripts/requirements.txt && python scripts/seed-load.py --file scripts/seeds/users.csv"]
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- acs-net
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
networks:
|
||||
acs-net:
|
||||
Reference in New Issue
Block a user