Flask auto reload inside docker


I found this tips when i developed flask inside docker, with this method we can make docker auto reload when change some code or under development

  flaskweb:
    build: ./apps
    container_name: flask-apps
    ports:
      - 7100:7100
    environment:
      PORT: 7100
      FLASK_DEBUG: 1
    restart: always
    volumes: ['./apps:/usr/src/app/'] <-- apps is my flask folder
    depends_on:
      - db

Advertisement

Author: susiloharjo

Khoirunnas anfa'ahum linnas A Father, Husband and love to learn person Love my Family, Electronics, Photography, Robot, Dreaming, Programming

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: