Skip to content
/ tPay Public

Docker 환경에서 DRF를 이용한 간단한 CRUD Rest API 구현

Notifications You must be signed in to change notification settings

taxijjang/tPay

Repository files navigation

Django runserver 실행 방법 및 접속 URL

  1. 가상환경 생성 후 패키지 설치
  • python -m venv venv

  • source venv/scripts/activate

  • pip install -r requirements.txt

  1. django 실행
  • python manage.py runserver

  1. 접속 URL (http://127.0.0.1:8000)
  • 상품 GET - /shop/products/, /shop/products/{pk}/

  • 상품 POST - /shop/products/

  • 상품 patch - /shop/products/{pk}/


Docker run (또는 docker-compose up) 실행 방법 및 접속 URL

docker-compose file을 작성하여 was를 구성
  1. WAS 구성요소
  • Nginx

  • Gunicorn

  • Django

  1. docker-compose 실행 방법
  • docker-compose.yml 파일이 있는 디렉토리로 이동

  • docker-compose up --build

  1. 접속 URL (http://127.0.0.1)
  • 상품 GET - /shop/products/, /shop/products/{pk}/

  • 상품 POST - /shop/products/

  • 상품 patch - /shop/products/{pk}/


API 테스트 방법 또는 Postman Export 결과( Postman Export 파일 또는 Postman Url)

Postman Export

git action을 이용하여 CI 구축완료

  • feature branch에서 develop branch로 pr요청시 git action 작동

pytest를 이용하여 API unit-test 완료

  • 각각의 api에 대하여 unit test 진행

About

Docker 환경에서 DRF를 이용한 간단한 CRUD Rest API 구현

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published