Public | Automated Build

Last pushed: 5 months ago
Short Description
This is a Quiz Application developed using Flask.
Full Description

#+TITLE: flask-docker

#+AUTHOR: Veda Vyas

  • Setting up =Docker= to view elt-flask
    ** Install =DockerToolbar=

** Install =VirtualBox=

** Run =Docker Quickstart Terminal=

  • Run it from the Desktop (Windows users).

** Pull the image using =docker=

#+BEGIN_SRC
docker pull vedavyas/elt-flask

#+END_SRC

** Run the given image in a =container=

#+BEGIN_SRC
docker run -p 8080:80 vedavyas/elt-flask

#+END_SRC

** Setup =virtualbox=

#+BEGIN_SRC
VBoxManage controlvm default natpf1 "flask_app,tcp,127.0.0.1,8080,,8080"

#+END_SRC

  • Make sure that VBoxManage executable is added to path variable.

** Run the app

  • Goto [[localhost:8080]] and you should see the homepage of Quiz Software.
  • Creating your own version of this repository
    ** Fork this repository.
  • If you are a collaborator of this repo skip forking and clone this repository.

** Create an account at DockerHub

** Create a repository

  • Click the "Create" dropdown in the far top right corner (not the "Create Repository+" button).

** Link project to Github

  • Select "Create Automated Build"
  • Link your Github account, select your user, select the github repo, etc.
  • Click the "Trigger a build" button, go to the "Build Details" tab and you should see a new build for your container.
  • Testing your =docker container= for changes
    ** Make a change to your Flask application
  • White space changes or comments are easy to test.

** Push your change to github.

#+BEGIN_SRC
git add <changed files>
git commit -m <commit message>
git push origin master

#+END_SRC

** Check build update

  • Go to your dockerhub account.
  • Click on your automated build repository.
  • Click the build details tab.
  • You can now see the update build.

** Open =docker= terminal

#+BEGIN_SRC
docker pull vedavyas/elt-flask
docker run -p 8080:80 vedavyas/elt-flask

#+END_SRC

** Check the app

  • Go to [[localhost:8080]] in your browser and you should see your application.
Docker Pull Command
Owner
vedavyas
Source Repository