Git Product home page Git Product logo

dash-nginx-uwsgi-docker's Introduction

Dash - nginx - uWSGI - Docker

Dash by Plotly is a Python framework to build elegant interactive dashboards for the web. This template can be used to create a Docker image that uses Flask, Nginx, and uWSGI to serve the application.

Dockerize your Dash app

  1. Create Docker image
docker build -t my_dashboard .
  1. Run app in container
docker run -p 8080:80 my_dashboard

This will run the app on http://localhost:8080/.

The base image used in the Dockerfile: https://hub.docker.com/r/tiangolo/uwsgi-nginx-flask/.

dash-nginx-uwsgi-docker's People

Contributors

khannajai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dash-nginx-uwsgi-docker's Issues

Mounting /app as volume to host

A little new to docker so apologies for the noobish question in advance...but is it possible to mount the /app dir to the host so I can edit files locally?

I'm trying to do something like this (below) but the /app directory keeps coming up empty when the last two lines where I mount the volume are included in my docker-compose

Dockerfile

FROM tiangolo/uwsgi-nginx-flask:python3.6
LABEL maintainer="maintainer"
RUN git clone https://XXX:[email protected]/XXX/fitness.git
RUN pip install -U pip && pip install -r ./fitness/requirements.txt
ENV NGINX_WORKER_PROCESSES auto

Docker Compose

  fitly:
    build:
      context: ./dockercontrol-master
      dockerfile: fitly-dockerfile
    container_name: fitly
    depends_on:
      - mariadb
    ports:
      - "8050:8050"
    environment:
      - PUID=1001
      - PGID=100
    volumes:
      - /share/CACHEDEV2_DATA/Container/Fitly:/app

Currently this puts the root dir of my repo into the root dir of the container... Ideally I'd want to just inject the contents of my repo right into the /app folder, this way every time i rebuild the container with compose, it automatically just pulls the latest files from the repo

main.py missing import

Thank you for this example.

Your code is not working because main.py is missing import flask.

Bonus: The import of dash_core is not used.

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.