docs: clarify standalone 2-file Docker deployment without git clone
Build and Push Docker Image / build-and-push (push) Successful in 10m43s

This commit is contained in:
2026-08-21 18:46:29 +09:00
parent 59b20d459c
commit 6555d33e91
3 changed files with 34 additions and 22 deletions
+2 -2
View File
@@ -26,9 +26,9 @@
- Added localized i18n strings for Export across English, Korean, and Japanese.
- Configured production multi-stage `Dockerfile` with standalone Next.js runner, Prisma CLI migrations support, and automated `docker-entrypoint.sh` startup script.
- Added `.dockerignore` for minimal context transfer and fast build times.
- Refined `docker-compose.yml` and `.env.example` to support prebuilt registry images (`CHECKFLOW_IMAGE`), Watchtower auto-updating labels, and automated database migrations.
- Refined `docker-compose.yml` and `.env.example` to support standalone 2-file deployment (`docker-compose.yml` + `.env`) without cloning source code, prebuilt registry images (`CHECKFLOW_IMAGE`), Watchtower auto-updating labels, and automated database migrations.
- Automated Gitea Actions CI workflow (`.gitea/workflows/docker-build.yaml`) for building & pushing container images to Gitea Container Registry with lowercase repository name normalization (`env.REPO`) and OCI source labels (`org.opencontainers.image.source`) for automatic repository package linkage.
- Completely revamped `README.md` to reflect project design philosophy, architecture, Docker setup, Watchtower auto-update, and open-standard CalDAV sync guidelines.
- Completely revamped `README.md` to reflect standalone 2-file Docker deployment (with curl/wget commands), Watchtower auto-update, architecture, and open-standard CalDAV sync guidelines.
- Validated that `npm run lint` and `npm run build` execute with 0 errors and 0 warnings.
- **Next Steps (Todo):**
+32 -18
View File
@@ -72,49 +72,63 @@
## 🚀 빠른 시작 (Docker 배포)
CheckFlow는 빌드된 레지스트리 이미지와 자동 데이터베이스 마이그레이션 진입점(`docker-entrypoint.sh`)을 지원하여 `docker compose` 명령 하나로 즉시 배포 및 구동됩니다.
CheckFlow는 사전 빌드된 컨테이너 레지스트리 이미지와 자동 DB 마이그레이션 진입점(`docker-entrypoint.sh`)을 제공하므로, **Git 소스 코드 복제(clone) 없이 `docker-compose.yml``.env` 파일 단 2개만으로 즉시 배포**할 수 있습니다.
### 1. 환경 변수 구성
`.env.example` 파일을 복사하여 환경 변수를 설정합니다:
### 1. 배포 디렉터리 준비 및 설정 파일 다운로드
서버의 원하는 디렉터리에서 설정 파일 2개를 내려받습니다:
```bash
mkdir checkflow && cd checkflow
# docker-compose.yml 다운로드
curl -O https://git.nrh.kr/Neru_Han/checkflow/raw/branch/master/docker-compose.yml
# .env.example 다운로드 후 .env 생성
curl -O https://git.nrh.kr/Neru_Han/checkflow/raw/branch/master/.env.example
cp .env.example .env
```
`.env` 파일 설정:
### 2. 환경 변수(`.env`) 설정
`.env` 파일을 열어 사용자 환경에 맞게 수정합니다:
```env
# 데이터베이스 비밀번호 (프로덕션 환경에서는 안전한 비밀번호로 변경하세요)
# [필수] 데이터베이스 비밀번호 (안전한 난수로 지정)
POSTGRES_PASSWORD=your_secure_password
# 서비스 도메인 또는 접근 IP
# [필수] 서비스 접속 URL (리버스 프록시 도메인 또는 IP)
NEXTAUTH_URL=https://todo.yourdomain.com
# NextAuth 인증 시크릿 키 (openssl rand -base64 32 등으로 생성)
# [필수] NextAuth 세션 암호화 키 (openssl rand -base64 32 등으로 생성)
NEXTAUTH_SECRET=your_generated_random_secret_string
# 외부 노출 포트 (기본값: 3000)
# [선택] 외부 노출 포트 (기본값: 3000)
PORT=3000
# Gitea / Docker 컨테이너 레지스트리 이미지 주소
CHECKFLOW_IMAGE=git.yourdomain.com/neru_han/checkflow:latest
# [선택] Gitea / Docker 컨테이너 레지스트리 이미지 주소
CHECKFLOW_IMAGE=git.nrh.kr/neru_han/checkflow:latest
```
### 2. 최신 이미지 가져오기 및 컨테이너 실행
### 3. 컨테이너 이미지 풀(Pull) 및 실행
Gitea 패키지 레지스트리가 비공개인 경우 먼저 도커 로그인을 수행합니다 (공개 레지스트리인 경우 생략 가능):
```bash
# (비공개 레지스트리인 경우 1회 로그인)
docker login git.nrh.kr
# 최신 배포 이미지 다운로드
docker compose pull
# 백그라운드 컨테이너 실행
# 백그라운드 서비스 시작
docker compose up -d
```
> 💡 **자동 DB 마이그레이션**: 컨테이너 구동 시 `docker-entrypoint.sh`가 PostgreSQL 헬스체크를 확인한 후 `prisma migrate deploy`를 자동 행하므로 수동 DB 마이그레이션 절차가 필요하지 않습니다.
> 💡 **자동 DB 마이그레이션**: 컨테이너가 시작될 때 PostgreSQL 데이터베이스 준비 상태를 확인한 후 `prisma migrate deploy`를 자동 행하므로 별도의 수동 DB 설정이 전혀 필요하지 않습니다.
### 🔄 Watchtower 기반 자동 갱신 권장
`docker-compose.yml``app` 서비스에는 `com.centurylinklabs.watchtower.enable=true` 라벨이 포함되어 있습니다.
Gitea Actions CI 파이프라인에서 새 이미지가 푸시되면 Watchtower가 이를 감지하여 무중단에 가깝게 컨테이너를 최신 버전으로 자동 갱신할 수 있습니다:
### 🔄 Watchtower 기반 무중단 자동 갱신
`docker-compose.yml`에는 `com.centurylinklabs.watchtower.enable=true` 라벨이 기본 적용되어 있습니다.
Gitea Actions CI 파이프라인을 통해 새 이미지가 레지스트리에 푸시되면, Watchtower가 이를 감지하여 컨테이너를 자동으로 최신 상태로 갱신합니다:
```bash
# Watchtower 실행 중인 경우 자동 감지 (또는 원클릭 업데이트 지원)
# Watchtower 실행 중인 경우 CheckFlow 컨테이너 자동 감지 & 갱신
docker run -d \
--name watchtower \
--restart unless-stopped \
@@ -122,7 +136,7 @@ docker run -d \
containrrr/watchtower --interval 300 --cleanup --label-enable
```
브라우저에서 설정한 도메인(또는 `http://localhost:3000`)에 접속하여 첫 관리자 계정을 등록하고 사용을 시작하세요.
브라우저에서 설정한 도메인(`https://todo.yourdomain.com` 또는 `http://서버IP:3000`)에 접속하여 첫 관리자 계정을 생성하고 바로 사용을 시작하세요.
---
-2
View File
@@ -37,8 +37,6 @@ services:
NODE_ENV: production
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- ./prisma:/app/prisma
volumes:
postgres_data: