Giter Club home page Giter Club logo

blog's People

Contributors

alinagator avatar kernal23 avatar ucg8j avatar

Watchers

 avatar  avatar

blog's Issues

Shiny Proxy Demo: Debugging "Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed" error

Hello!

Thank you for this informative and helpful demo! When trying it on macOS 10.14.6, I ran into issues launching the 01 and 06 shiny proxy apps (the classic 500 error) after launching the jar file. After digging, I found the solution to be using the application-demo.yml file in shinyproxy/src/main/resources/application-demo.yml and running socat TCP-LISTEN:2375,range=127.0.0.1/32,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock in another terminal window. I think this is helpful information to include in your demo. More information can be found here: https://stackoverflow.com/questions/64216274/docker-desktop-for-mac-bind-to-tcp-port. I understand this configuration is not secure, but if you're just trying to learn how to run shiny proxy locally with minikube/docker desktop on mac, this is helpful to know.

Feel free to add if you think it's worth it. Regardless, I hope posting this issue will help anyone else out there like me.

Self-hosted RSS using external clients

https://github.com/ucg8j/blog/blob/master/posts/rss-feed-reader.md

The benefit of FreshRSS for me is that it is supported in a multitude of RSS readers, so I can host FreshRSS and let it sync on its own schedule, and then open clients on iOS/macOS/Android and see the unread items almost immediately with no scan/refresh needed. So you can choose a client that suits all your needs with no compromises. They have a list of compatible apps in their readme, but any that are compatible with the old GReader login method will work.

Dash - deployment

Dear Luke,

I ran into your blog after much troubleshooting regarding my Dash application.
https://lukesingham.com/how-to-deploy-plotlys-dash-using-shinyproxy/

First of all, I want to thank you for your clear explanations.
The issue you described here is exactly the issue I encounter.

However, your snippet / solution does not seem to cut it for me.

Background and context :

I am still a newbie and had to learn in less time than ideal a lot of deployments and tools such a gunicorn, docker, and Plesk (admin panel) to deploy this application.

I was wondering if you maybe could point out a mistake I'm making or something I overlooked.

If you're not familiar with it, Plesk is an hosting tool providing admin panel to handle web applications and has an extension and support for docker.

I was asked to deploy my Dash appplication there in a domain or subdomain managed by plesk.

Things I tried - thoughts process

I first tried deploying with mod_wsgi and apache, and ran into the "error loading layout" issue.

This motivated me to learn and dockerize my app because I thought it would better isolate it.
However, since it's not the issue, it ended up failing.

I am currently using gunicorn, but also tried with native python cmd in a dockerfile.
Both time I ran into the same issue "error loading layout".

When uploading my docker image on plesk, it runs fine on localhost:8050 (the port I am using)

After adding a proxy rule such as below to deploy the container and previewing the website, I always run into the issue:
image

Error loading layout .. with bad api route for dash dependencies / layout.
I updated to latest dash version (1.19) just in case there was a fix but it does not seem to work either.

I am a bit desperate hence why I am wondering if you could help me .
Deploying without proxy would be the last recourse but is really not ideal.

Details

My app.py file

# DASHAPP
server = Flask(__name__)
app = dash.Dash(__name__,
                server=server,
                external_stylesheets=external_stylesheets,
                suppress_callback_exceptions=True)
# In order to work on shinyproxy (and perhaps other middleware)
app.config.update({
    # remove the default of '/'
    'routes_pathname_prefix': '',

    # remove the default of '/'
    'requests_pathname_prefix': ''
})
server = app.server
server.secret_key = os.environ.get("SECRET_KEY")

dockerfile


FROM python:3.8

COPY . /myapp

WORKDIR /myapp

RUN pip install -r requirements.txt

EXPOSE 8050

CMD ["gunicorn" , "-b", ":8050", "app:server" ]

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.