GithubHelp home page GithubHelp logo

river's Introduction

River Architecture

  • Origin Server
    • Nginx Unit
  export UNIT=$(                                                         \
      docker run -d                                                      \
      --mount type=bind,src="$(pwd)/config/",dst=/docker-entrypoint.d/   \
      --mount type=bind,src="$(pwd)/log/unit.log",dst=/var/log/unit.log  \
      --mount type=bind,src="$(pwd)/state",dst=/var/lib/unit             \
      --mount type=bind,src="$(pwd)/www",dst=/www                     \
      -p 80:80  unit:1.30.0-minimal                                           \
  )

  export UNIT=$(                                                         \
      docker run -d                                                      \
      --mount type=bind,src="$(pwd)/config/",dst=/docker-entrypoint.d/   \
      --mount type=bind,src="$(pwd)/log/unit.log",dst=/var/log/unit.log  \
      --mount type=bind,src="$(pwd)/state",dst=/var/lib/unit             \
      --mount type=bind,src="$(pwd)/www",dst=/www                     \
      -p 80:80  unit:1.30.0-node18                                     \
  )
export UNIT_CONFIG=$(cat config.json)
RUN echo $UNIT config.json /docker-entrypoint.d/config.json

Start Cloudflared

docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL}
# https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/
cloudflared tunnel login
cloudflared tunnel list
cloudflared tunnel create river
cloudflared tunnel route dns river lagom.page
cloudflared service install
sudo launchctl start com.cloudflare.cloudflared

sudo launchctl stop com.cloudflare.cloudflared
$ sudo launchctl start com.cloudflare.cloudflared

sudo cloudflared service install ${CLOUDFLARE_TUNNEL2}
docker run --rm -it docker.io/cloudflare/cloudflared:latest tunnel --hello-world
  With your certificate installed you can then get started with Tunnels:
   
     $ cloudflared tunnel create my-first-tunnel
     $ cloudflared tunnel route dns my-first-tunnel my-first-tunnel.mydomain.com
     $ cloudflared tunnel run --hello-world my-first-tunnel

Cloudflared quick tunnel

cloudflared tunnel --url localhost:8080

cloudflared named tunnel

creating Named Tunnels

https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide

cloudflared tunnel login
# cloudflared tunnel create <TUNNEL_NAME> or <TUNNEL_UUID>
cloudflared tunnel create river
cloudflared tunnel route dns river river.lagom.page

Unix socket path

/var/run/control.unit.sock

Reconfigure


docker exec -i <contain_id> sh -c "curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock http://localhost/config" < config.json

docker exec -i ba3737b060f7 sh -c "curl -X PUT --data-binary @- --unix-socket /var/run/control.unit.sock http://localhost/config" < config.json

docker exec -ti ba3737b060f7 curl --unix-socket /var/run/control.unit.sock http://localhost/config

Build

Typescript files are built using tsconfig files property.

  • Add entry to every entry point here

river's People

Contributors

fusionstrings avatar

Watchers

 avatar

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.