[GH-ISSUE #468] fly deployment does not work #307

Closed
opened 2026-02-25 20:35:24 +03:00 by kerem · 9 comments
Owner

Originally created by @eikaramba on GitHub (Oct 18, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/468

fly is renamed to flyctl it seems.
also there is no image builder anymore

how can you deploy with fly currently?

Originally created by @eikaramba on GitHub (Oct 18, 2021). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/468 fly is renamed to flyctl it seems. also there is no image builder anymore how can you deploy with fly currently?
kerem 2026-02-25 20:35:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@eikaramba commented on GitHub (Oct 18, 2021):

for me what worked was to use the following commands:

//clone repo
flyctl apps create --org personal
//then create fly.toml manually as seen here, change app name https://fly.io/docs/app-guides/run-a-global-image-service/#deploying-docker-images-to-fly
flyctl deploy -i benbusby/whoogle-search:latest

but even then when i try to search it does not load the results

<!-- gh-comment-id:945853810 --> @eikaramba commented on GitHub (Oct 18, 2021): for me what worked was to use the following commands: //clone repo `flyctl apps create --org personal` //then create fly.toml manually as seen here, change app name https://fly.io/docs/app-guides/run-a-global-image-service/#deploying-docker-images-to-fly `flyctl deploy -i benbusby/whoogle-search:latest` but even then when i try to search it does not load the results
Author
Owner

@benbusby commented on GitHub (Oct 27, 2021):

@jeromegn any idea what could be the issue here? I haven't had a chance to look into it yet, but you may have a better idea of what's changed since your original PR to include support for Fly.io.

<!-- gh-comment-id:953211338 --> @benbusby commented on GitHub (Oct 27, 2021): @jeromegn any idea what could be the issue here? I haven't had a chance to look into it yet, but you may have a better idea of what's changed since your original PR to include support for Fly.io.
Author
Owner

@jeromegn commented on GitHub (Oct 27, 2021):

I'm not entirely sure. @eikaramba can you provide logs? flyctl logs

<!-- gh-comment-id:953381010 --> @jeromegn commented on GitHub (Oct 27, 2021): I'm not entirely sure. @eikaramba can you provide logs? `flyctl logs`
Author
Owner

@joonas-fi commented on GitHub (Oct 30, 2021):

Just set up whoogle on Fly two weeks ago, worked for me.

<!-- gh-comment-id:955299576 --> @joonas-fi commented on GitHub (Oct 30, 2021): Just set up whoogle on Fly two weeks ago, worked for me.
Author
Owner

@eikaramba commented on GitHub (Oct 30, 2021):

as i said, the steps are not valid anymore. I did this now again

  • clone repo //is this even needed? i mean i am just using an image for deployment right?
  • flyctl apps create --org personal //set appname
  • flyctl deploy -i benbusby/whoogle-search:latest -a YOURAPPNAME

But on the served domain it just returns PR_END_OF_FILE_ERROR and that it is not secure.

i'm sorry but i don't even know where to start.
the command flyctl logs -a whoogle-eikaramba outputs

2021-10-30T15:19:44.173 runner[fb25175a] lhr [info] Starting instance
2021-10-30T15:19:44.203 runner[fb25175a] lhr [info] Configuring virtual machine
2021-10-30T15:19:44.209 runner[fb25175a] lhr [info] Pulling container image
2021-10-30T15:19:45.728 runner[fb25175a] lhr [info] Unpacking image
2021-10-30T15:19:50.719 runner[fb25175a] lhr [info] Preparing kernel init
2021-10-30T15:19:51.173 runner[fb25175a] lhr [info] Configuring firecracker
2021-10-30T15:19:51.305 runner[fb25175a] lhr [info] Starting virtual machine
2021-10-30T15:19:51.449 app[fb25175a] lhr [info] Starting init (commit: 50ffe20)...
2021-10-30T15:19:51.471 app[fb25175a] lhr [info] Preparing to run: `/bin/sh -c misc/tor/start-tor.sh & ./run` as root
2021-10-30T15:19:51.487 app[fb25175a] lhr [info] 2021/10/30 15:19:51 listening on [fdaa:0:369b:a7b:2808:fb25:175a:2]:22 (DNS: [fdaa::3]:53)
2021-10-30T15:19:51.661 app[fb25175a] lhr [info] Starting tor daemon...done.
2021-10-30T15:19:52.476 app[fb25175a] lhr [info] Reaped child process with pid: 534, exit code: 0
2021-10-30T15:19:59.985 app[fb25175a] lhr [info] Serving on http://0.0.0.0:5000
wg connect fdaa:0:369b::3 lhr1.gateway.6pn.dev:51820 fdaa:0:369b:a7b:dc6:0:a:0 fdaa:0:369b::

would be nice to share how you did it @joonas-fi

<!-- gh-comment-id:955326536 --> @eikaramba commented on GitHub (Oct 30, 2021): as i said, the steps are not valid anymore. I did this now again - clone repo //is this even needed? i mean i am just using an image for deployment right? - flyctl apps create --org personal //set appname - flyctl deploy -i benbusby/whoogle-search:latest -a YOURAPPNAME But on the served domain it just returns PR_END_OF_FILE_ERROR and that it is not secure. i'm sorry but i don't even know where to start. the command flyctl logs -a whoogle-eikaramba outputs ``` 2021-10-30T15:19:44.173 runner[fb25175a] lhr [info] Starting instance 2021-10-30T15:19:44.203 runner[fb25175a] lhr [info] Configuring virtual machine 2021-10-30T15:19:44.209 runner[fb25175a] lhr [info] Pulling container image 2021-10-30T15:19:45.728 runner[fb25175a] lhr [info] Unpacking image 2021-10-30T15:19:50.719 runner[fb25175a] lhr [info] Preparing kernel init 2021-10-30T15:19:51.173 runner[fb25175a] lhr [info] Configuring firecracker 2021-10-30T15:19:51.305 runner[fb25175a] lhr [info] Starting virtual machine 2021-10-30T15:19:51.449 app[fb25175a] lhr [info] Starting init (commit: 50ffe20)... 2021-10-30T15:19:51.471 app[fb25175a] lhr [info] Preparing to run: `/bin/sh -c misc/tor/start-tor.sh & ./run` as root 2021-10-30T15:19:51.487 app[fb25175a] lhr [info] 2021/10/30 15:19:51 listening on [fdaa:0:369b:a7b:2808:fb25:175a:2]:22 (DNS: [fdaa::3]:53) 2021-10-30T15:19:51.661 app[fb25175a] lhr [info] Starting tor daemon...done. 2021-10-30T15:19:52.476 app[fb25175a] lhr [info] Reaped child process with pid: 534, exit code: 0 2021-10-30T15:19:59.985 app[fb25175a] lhr [info] Serving on http://0.0.0.0:5000 wg connect fdaa:0:369b::3 lhr1.gateway.6pn.dev:51820 fdaa:0:369b:a7b:dc6:0:a:0 fdaa:0:369b:: ``` would be nice to share how you did it @joonas-fi
Author
Owner

@joonas-fi commented on GitHub (Oct 30, 2021):

@eikaramba I don't remember everything that I did (I mucked around with SSL certificates & custom domain name), but the gist is that I deployed it from the official Docker image (no repo cloning needed).

All I have is this fly.toml which I deployed:

app = "search-yourexamplename"

kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  image = "benbusby/whoogle-search:0.5.4"

[env]
EXPOSE_PORT = "80"
WHOOGLE_CONFIG_GET_ONLY = "1"
WHOOGLE_CONFIG_COUNTRY = "countryFI"
WHOOGLE_CONFIG_LANGUAGE = "lang_en"
WHOOGLE_CONFIG_SEARCH_LANGUAGE = "lang_en"

[[services]]
  http_checks = []
  internal_port = 80
  processes = ["app"]
  protocol = "tcp"
  script_checks = []

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 6
    timeout = "2s"
<!-- gh-comment-id:955337023 --> @joonas-fi commented on GitHub (Oct 30, 2021): @eikaramba I don't remember everything that I did (I mucked around with SSL certificates & custom domain name), but the gist is that I deployed it from the official Docker image (no repo cloning needed). All I have is this `fly.toml` which I deployed: ```yaml app = "search-yourexamplename" kill_signal = "SIGINT" kill_timeout = 5 processes = [] [build] image = "benbusby/whoogle-search:0.5.4" [env] EXPOSE_PORT = "80" WHOOGLE_CONFIG_GET_ONLY = "1" WHOOGLE_CONFIG_COUNTRY = "countryFI" WHOOGLE_CONFIG_LANGUAGE = "lang_en" WHOOGLE_CONFIG_SEARCH_LANGUAGE = "lang_en" [[services]] http_checks = [] internal_port = 80 processes = ["app"] protocol = "tcp" script_checks = [] [services.concurrency] hard_limit = 25 soft_limit = 20 type = "connections" [[services.ports]] handlers = ["http"] port = 80 [[services.ports]] handlers = ["tls", "http"] port = 443 [[services.tcp_checks]] grace_period = "1s" interval = "15s" restart_limit = 6 timeout = "2s" ```
Author
Owner

@eikaramba commented on GitHub (Oct 30, 2021):

thanks, i did save your config(changed appname and increased image to 0.6.0) and just used

  • flyctl apps create --org personal //set appname
  • flyctl deploy

it is serving the app on port 80 (heck it even works on 443 when using hoppscotch). unfortunately for the love of god i am not able to make it work in any browser (chrome,ff,edge). they all try to establish https and it fails.

update: ok strange, after a few minutes it works now?

<!-- gh-comment-id:955409837 --> @eikaramba commented on GitHub (Oct 30, 2021): thanks, i did save your config(changed appname and increased image to 0.6.0) and just used - flyctl apps create --org personal //set appname - flyctl deploy it is serving the app on port 80 (heck it even works on 443 when using [hoppscotch](https://hoppscotch.io)). unfortunately for the love of god i am not able to make it work in any browser (chrome,ff,edge). they all try to establish https and it fails. update: ok strange, after a few minutes it works now?
Author
Owner

@joonas-fi commented on GitHub (Oct 30, 2021):

The URL works fine for me. Did you give it a chance to issue the SSL cert? Could've taken a while for Fly infrastructure to provision the certificate. The Fly CLI had subcommands to check the status of the SSL certificate issuance process.

<!-- gh-comment-id:955418920 --> @joonas-fi commented on GitHub (Oct 30, 2021): The URL works fine for me. Did you give it a chance to issue the SSL cert? Could've taken a while for Fly infrastructure to provision the certificate. The Fly CLI had subcommands to check the status of the SSL certificate issuance process.
Author
Owner

@eikaramba commented on GitHub (Oct 30, 2021):

yes that must be it. thank you very much. i think we can solve it then. just create the fly.toml as:

app = "YOURAPP"

kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  image = "benbusby/whoogle-search:0.6.0"

[env]
EXPOSE_PORT = "80"
WHOOGLE_CONFIG_GET_ONLY = "0"
WHOOGLE_CONFIG_COUNTRY = "countryDE" //adapt as you please
WHOOGLE_CONFIG_LANGUAGE = "lang_de" //adapt as you please
WHOOGLE_CONFIG_SEARCH_LANGUAGE = "lang_de" //adapt as you please

[[services]]
  http_checks = []
  internal_port = 80
  processes = ["app"]
  protocol = "tcp"
  script_checks = []

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 6
    timeout = "2s"

and do the above two commands. bam

<!-- gh-comment-id:955423699 --> @eikaramba commented on GitHub (Oct 30, 2021): yes that must be it. thank you very much. i think we can solve it then. just create the fly.toml as: ``` app = "YOURAPP" kill_signal = "SIGINT" kill_timeout = 5 processes = [] [build] image = "benbusby/whoogle-search:0.6.0" [env] EXPOSE_PORT = "80" WHOOGLE_CONFIG_GET_ONLY = "0" WHOOGLE_CONFIG_COUNTRY = "countryDE" //adapt as you please WHOOGLE_CONFIG_LANGUAGE = "lang_de" //adapt as you please WHOOGLE_CONFIG_SEARCH_LANGUAGE = "lang_de" //adapt as you please [[services]] http_checks = [] internal_port = 80 processes = ["app"] protocol = "tcp" script_checks = [] [services.concurrency] hard_limit = 25 soft_limit = 20 type = "connections" [[services.ports]] handlers = ["http"] port = 80 [[services.ports]] handlers = ["tls", "http"] port = 443 [[services.tcp_checks]] grace_period = "1s" interval = "15s" restart_limit = 6 timeout = "2s" ``` and do the above two commands. bam
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#307
No description provided.