icurfer bffd2c9c70
All checks were successful
Build And Test / build-and-push (push) Successful in 2m8s
chore: OpenTelemetry 디버그 로그 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 12:56:53 +09:00
2026-01-25 12:56:05 +09:00
2026-01-24 02:10:06 +09:00
2025-09-28 23:37:42 +09:00
2025-09-28 23:37:42 +09:00
2026-01-17 00:04:16 +09:00
2026-01-25 12:56:05 +09:00

msa-django-blog

마크다운 기반 기술 블로그 서비스입니다.

기술 스택

분류 기술
Framework Django 4.2.14
API Django REST Framework 3.16.0
Auth SimpleJWT 5.5.0 (RS256)
Database MySQL (mysqlclient 2.2.7)
Docs drf-yasg 1.21.10
Server Gunicorn 20.1.0

주요 기능

  • 포스트 관리: 마크다운 기반 글 작성/수정/삭제
  • 태그 시스템: 다중 태그 지원, 태그별 필터링
  • 댓글/대댓글: 계층형 댓글 구조
  • 작성자 관리: JWT 기반 작성자 식별

API 엔드포인트

포스트

Method Endpoint 설명 권한
GET /api/blog/posts/ 포스트 목록 공개
GET /api/blog/posts/?tag=tagname 태그 필터링 공개
GET /api/blog/posts/<id>/ 포스트 상세 공개
GET /api/blog/create/ 내 포스트 목록 인증
POST /api/blog/create/ 포스트 생성 인증
PUT/PATCH /api/blog/posts/<id>/ 포스트 수정 작성자
DELETE /api/blog/posts/<id>/ 포스트 삭제 작성자

댓글

Method Endpoint 설명 권한
GET /api/blog/posts/<id>/comments/ 댓글 목록 공개
POST /api/blog/posts/<id>/comments/ 댓글 작성 인증
PUT /api/blog/posts/<id>/comments/<id>/ 댓글 수정 작성자
DELETE /api/blog/posts/<id>/comments/<id>/ 댓글 삭제 작성자

태그

Method Endpoint 설명
GET /api/blog/tags/ 태그 목록

API 문서

  • Swagger UI: /swagger/

데이터 모델

Post

필드 타입 설명
title CharField 제목
content TextField 마크다운 본문
tags ManyToMany 태그 목록
author_id CharField 작성자 ID
author_name CharField 작성자 이름
created_at DateTimeField 생성일
updated_at DateTimeField 수정일

Comment

필드 타입 설명
post ForeignKey 포스트
parent ForeignKey(self) 부모 댓글 (대댓글용)
content TextField 댓글 내용
author_id CharField 작성자 ID
author_name CharField 작성자 이름

Tag

필드 타입 설명
name CharField 태그명 (고유)

환경 변수

# Django
DEBUG=1
SECRET_KEY=your-secret-key

# Database
SQL_ENGINE=django.db.backends.mysql
SQL_HOST=localhost
SQL_USER=user
SQL_PASSWORD=password
SQL_DATABASE=msa-demo
SQL_PORT=3306

# JWT
ISTIO_JWT=1

실행 방법

개발 서버

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:8800

운영 서버

gunicorn blog_prj.wsgi:application --bind 0.0.0.0:8800 --workers 3

Docker

docker build -t msa-django-blog .
docker run -p 8000:8000 --env-file .env.dev msa-django-blog
Description
No description provided
Readme 135 KiB
Languages
Python 98.5%
Dockerfile 1.5%