Giter VIP home page Giter VIP logo

webify's People

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webify's Issues

Passing variable into webified bash script

I cannot seem to be able to make the following minimal example run:

cat <<EOF > demo.sh
#!/bin/sh

VAR="\$(< /dev/stdin)"
echo \$VAR
EOF

sudo chmod +x demo.sh
docker run -it --rm -p 8080:80 -v $(realpath demo.sh):/script beefsack/webify:latest

and then:

curl http://localhost:8080 -d $(date '+%Y-%m-%d')

Am I doing something wrong? Expected output is the current date. Actual is a blank line.
I would like to help with extending webify if this is a missing feature and I find the time.

Don't log error for client connection close

When the client closes the connection, we see errors in the server stderr such as:

2020/08/29 21:09:56 error writing response body: write tcp [::1]:8080->[::1]:50044: write: broken pipe

These aren't useful errors and should be suppressed. These errors have the value syscall.EPIPE.

Realistic example and documentation update

The examples in the README aren't useful. Implement a more realistic minimal example and update documentation to clarify what webify should and shouldn't be used for.

想实现web展示pyspark的sql结果,如何实现?

命令行下不方便,怎么展现到web上。
本来执行的代码:

进入pyspark

pyspark
sql='select * from table2'
spark.sql(sql).show()
我想实现的效果是,写一个python函数,传入不同的页面,在web上展示sql的结果。

Put some warning about security

You might put a word about security :-)
Like "Make sure your machine is not accessible from Internet when exposing shell commands".

webify manager

Hi,
I'm searching for a solution to replace a project i use : https://github.com/eoli3n/shellcast
It's a nodejs app, that I didn't maintain, but which works well.

It is kind of webify but with those features:

  • Multiple instances in a declarative yaml file
  • a Single webserver which map commands to routes. http://localhost/command1 http://localhost/command2
  • dynamic commands with php args -> shell args
  • password protection for each webservices
  • plain output (curl) and JS realtime shell output
  • realtime highlighter by word|line in JS output

I'm still looking for a tool to replace it. I need same features but i can skip the js realtime shell output part.
If i don't find anything, i will maybe upgrade shellcast and fix vulnerabilities.

Webify service for encrypting files

I would like to webify a service for encrypting files (oversimplification, but let's just say they are short yaml files to be encrypted).
The way I envision interacting with webify is to curl it with:

  • the key to be used in encryption (a separate file).
  • the yaml to be encrypted.

Something like:

curl \
  -F "key=@/home/me/key" \
  -F "input_yaml=@/home/me/input.yaml" \
  localhost:8080

How do I store the key and input.yaml files on the backend side to start the process?

Feature/Enhancement Request: Cloud Deploy

Add support for runtimes:

webify [--runtime=docker|azure|aws|gcloud|localhost] <command>

Running docker run -it -v script.sh:/script ... does not work unless:

  1. Host is linux (binding a single file, not folder with -v does not seem to work on macOS)
  2. Docker engine is running on the same machine where the docker run command is being executed (often not the case; I am on macOS and use docker-machine).

The idea is for this to be a stepping stone to building docker images that can run as Azure Functions or other "serverless" runtimes.

Also keeps webify pure in that --runtime can default to "localhost" (i.e. just run webify locally as now).

Runtime Docker

  1. build docker image with script copied
  2. either echo "image name" or docker run -it --rm <image> ?

Runtime Azure

No idea yet, but https://github.com/Azure-Samples/functions-custom-handlers/tree/master/go might be a starting point

Serving of simple text not updating in Docker, cached text displayed instead

Using webify in docker, I'm seeing cached values for simple text:

script.sh:

#!/bin/sh

echo foo
docker run -d --rm -p 8080:80 -v  $(realpath script.sh):/script beefsack/webify

If I change foo to bar, curl http://localhost:8080 still displays the old value.

This only occurs in Docker, if I run webify on baremetal, the updated value bar is displayed.

Feature request

Really Nice , would be even better if it serves on websockets. Accepting user input on the fly. It will then become a true terminal in browser.

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.