GithubHelp home page GithubHelp logo

fly deployment about pgrok HOT 11 OPEN

pgrok avatar pgrok commented on July 19, 2024
fly deployment

from pgrok.

Comments (11)

gedw99 avatar gedw99 commented on July 19, 2024 1

boy thats too easy !

flyctl launch
Creating app in /Users/apple/workspace/go/src/github.com/pgrok/pgrok
Scanning source code
Detected a Dockerfile app
? Choose an app name (leave blank to generate one): pgrokd
automatically selected personal organization: xxx
? Choose a region for deployment: Stockholm, Sweden (arn)
Created app pgrokd in organization personal
Admin URL: https://fly.io/apps/pgrokd
Hostname: pgrokd.fly.dev
Wrote config file fly.toml
? Would you like to set up a Postgresql database now? Yes
? Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk
Creating postgres cluster in organization personal
Creating app...
Setting secrets on app pgrokd-db...
Provisioning 1 of 1 machines with image flyio/postgres:14.6@sha256:9cfb3fafcc1b9bc2df7c901d2ae4a81e83ba224bfe79b11e4dc11bb1838db46e



from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024 1

Yes that’s right.

You can also get a bit fancy and slip stream the binaries in at runtime using a control plane like NATS jetstream.

You Store all versions of binaries inside Nats object store.

the docker boots and all it has is a nats.Go that a ts as an agent. It sits there on top of overmind and subscribes to the binaries.

When you have 10 I stances running on fly ( or anywhere else that can run a docker ) , they all update the binary a few milliseconds later.

you can fork the process and update the binary with zero down time.

This is something I have been working with for a while but have not finished it.

Nats is your registry and the binaries can live in your GitHub releases.

—-

Fly can btw use a do jet image that is hosted on GitHub packsge system too. You might find that useful

from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024

I can make a PR is you want once i get it working..

just let me know..

from pgrok.

unknwon avatar unknwon commented on July 19, 2024

I can make a PR is you want once i get it working..

😍 no reason to say no!

from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024

cool. will let you know..

from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024

@unknwon

if we use cockroachdb and embed it in the server then there is no need for docker or docker files.
We just use overmind to run them both.

this works on fly.io and well as anyones latop.

wanny try this ?

from pgrok.

unknwon avatar unknwon commented on July 19, 2024

Hey @gedw99!

if we use cockroachdb and embed it in the server then there is no need for docker or docker files.
We just use overmind to run them both.

What does it mean to "embed" when you say "embed it in the server". Does it mean just grab/install the binary version of the cockroachdb?

from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024

In the docker you put cockroachdb as well as Pgrok.

you also put overmind inside.

then you use overmind to start it up. So fly runs overmind which runs the other binaries!

this is how others run multiple processes on fly.io

from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024

You can also run caddy I side fly.io this way as well as whatever app your hosting / proxying

https://github.com/jveres/fly-keydb-serf/blob/main/Dockerfile

https://github.com/tmm1/flyapp-mastodon/blob/main/Dockerfile

from pgrok.

gedw99 avatar gedw99 commented on July 19, 2024

What I like about this is that it’s portable. It’s just a docker with overmind and the binaries

you can run this on a desktop without docker

from pgrok.

unknwon avatar unknwon commented on July 19, 2024

Gotcha, that sounds good to me! So we just need another Dockerfile to build images for fly.io (or in general, a bundle image).

from pgrok.

Related Issues (16)

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.