Skip to content

This repository demonstrates how to dockerize and deploy a Python-based application to Back4app Containers.

Notifications You must be signed in to change notification settings

duplxey/back4app-containers-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

back4app-containers-python

This repository demonstrates how to dockerize and deploy a Flask application to Back4app Containers.

To learn more check out the article.

Development

  1. Fork/Clone

  2. Create and activate a virtual environment:

    $ python3 -m venv venv && source venv/bin/activate
  3. Install the requirements:

    (venv)$ pip install -r requirements.txt
  4. Initialize the database:

    (venv)$ python init_db.py
  5. Run the server:

    (venv)$ flask run
  6. Navigate to http://localhost:5000/ in your favorite web browser.

Deploy (Docker)

  1. Install Docker (if you don't have it yet).

  2. Build and tag the image:

    (venv)$ docker build -t flask-todo:1.0 .
  3. Start a new container:

     (venv)$ docker run -it -p 5000:5000 -d flask-todo:1.0
  4. Navigate to http://localhost:5000/ in your favorite web browser.

About

This repository demonstrates how to dockerize and deploy a Python-based application to Back4app Containers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published