Git Product home page Git Product logo

devops_todolist_docker_core_task_2_volumes's Introduction

Django-Todolist

Django-Todolist is a todolist web application with the most basic features of most web apps, i.e. accounts/login, API and (somewhat) interactive UI.


CSS | Skeleton JS | jQuery

Explore

Try it out by installing the requirements. (Works only with python >= 3.8, due to Django 4)

pip install -r requirements.txt

Create a database schema:

python manage.py migrate

And then start the server (default: http://localhost:8000)

python manage.py runserver

Now you can browse the API or start on the landing page

Task

Prerequisites

  • Fork this repository

  • Open requirements.txt

  • Add mysql-connector-python==8.2.0

  • Open file todolist/settings.py

  • Go to line DATABASES on line 64

  • Update it with this code:

    DATABASES = {
        'default': {
            'ENGINE': 'mysql.connector.django',
            'NAME': 'app_db',
            'USER': 'app_user',
            'PASSWORD': '1234',
            'HOST': 'localhost',  # You can use a different host in your MySQL server is on a remote machine.
            'PORT': '',  # Leave this empty to use the default MySQL port (3306).
        }
    }
    
    

Requirements

  1. Prepare a Dockerfile to run a MySQL database, based on official MySQL Image
  2. Dockerfile should contain ENV variables to initialize app_db database
  3. Dockerfile should contain ENV variables to initialize app_user with password 1234
  4. Build mysql image with a name and tag mysql-local:1.0.0
  5. You should be able successfully run a container with MySQL with a Volumes Attached
  6. Push mysql-local:1.0.0 to your personal docker hub into mysql-local repository
  7. Run mysql-local:1.0.0 onn your machine
  8. Update the python app db config with an IP of a running MySQL server container (without it, the app container won’t build)
  9. Build and run your updated app
  10. Take a screenshot of a terminal with successfully started application
  11. Push Image with a name and tag: todoapp:2.0.0 to yout Docker Hub repository
  12. Update README.md with instructions on how to run MySQL container with a volume attached
  13. Update README.md with instructions on how to run an App container which will connect to a MySQL db container.
  14. README.md should contain a link to your personal docker hub repository win an app image
  15. README.md should contain instructions on how to access the application via a browser.
  16. Create PR with your changes and attach it for validation on a platform

devops_todolist_docker_core_task_2_volumes's People

Contributors

ykulyk404 avatar iekulyk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.