Skip to content

ekorolkov/devops-sample-django-app

 
 

Repository files navigation

Party Parrot App

parrot



Sample Python application on Django with PostgreSQL database.

Requirements


  • django 4.0.1
  • Pillow 9.0.0
  • psycopg2-binary 2.9.3
  • django-prometheus 2.2.0

Deployment


  • install Python 3.8
  • install libs
      pip3 install -r requirements.txt
  • Set environment export for variables:
      DJANGO_DB_HOST: db
      DJANGO_DB_NAME: app
      DJANGO_DB_USER: worker
      DJANGO_DB_PASS: worker
      DJANGO_DB_PORT: "5432"
      DJANGO_DEBUG: "False"
  • migrate database:
python3 manage.py migrate
  • start application:
python3 manage.py runserver 0.0.0.0:8000

Запуск контейнера Docker


  • Установить Docker
  • Сделать git clone репозитория
git clone https://github.com/ekorolkov/devops-sample-django-app
  • Перейти в папку приложения
cd devops-sample-django-app/
  • Создать образы
docker-compose build
  • Запустить приложение
docker-compose up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.5%
  • HTML 20.3%
  • Dockerfile 3.2%