Skip to content

HOD42/DevOps-Course-Starter

 
 

Repository files navigation

DevOps Apprenticeship: Project Exercise

Getting started

The project uses a virtual environment to isolate package dependencies. To create the virtual environment and install required packages, run the following from a bash shell terminal:

On macOS and Linux

$ source setup.sh

On Windows (Using PowerShell)

$ .\setup.ps1

On Windows (Using Git Bash)

$ source setup.sh --windows

Once the setup script has completed and all packages have been installed, start the Flask app by running:

$ flask run

You should see output similar to the following:

 * Serving Flask app "app" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with fsevents reloader
 * Debugger is active!
 * Debugger PIN: 226-556-590

Now visit http://localhost:5000/ in your web browser to view the app.

Notes

The .env file is used by flask to set environment variables when running flask run. This enables things like developement mode (which also enables features like hot reloading when you make a file change).

  • There's also a SECRET_KEY variable which is used to encrypt the flask session cookie.

When running setup.sh, the .env.template file will be copied to .env if the latter does not exist.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 46.6%
  • HTML 37.2%
  • Shell 9.7%
  • PowerShell 6.5%