Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are There Additional Self-Hosting Instructions? #65

Open
mergesort opened this issue Feb 9, 2024 · 4 comments
Open

Are There Additional Self-Hosting Instructions? #65

mergesort opened this issue Feb 9, 2024 · 4 comments

Comments

@mergesort
Copy link

Hey @videah, I decided to spin up an instance of Skybridge on Fly using your instructions in the readme. I updated the fly.toml and docker-compose.yml below, and while it does deploy to Fly I'm not able to get Skybridge to do anything. (Visiting the instance's URL just tries to load up a webpage that never loads.)

fly.toml

app = 'obscured-for-privacy'
primary_region = 'ewr'

[build]

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  cpu_kind = 'shared'
  cpus = 1
  memory_mb = 1024

Dockerfile

version: "3.8"
services:
  skybridge:
    container_name: "skybridge"
    image: videah/skybridge:latest
    restart: always
    volumes:
      - skybridge:/app/database
    environment:
      # Base URL of where SkyBridge will be hosted without the protocol.
      - SKYBRIDGE_BASEURL=obscured-for-privacy.fly.dev
      # Random secret, generate with `openssl rand -base64 32`.
      - SKYBRIDGE_SECRET
      # Password used to make a SkyBridge instance private.
      - SKYBRIDGE_AUTH_PASSWORD
      # Should a bridge password be required to authenticate?
      - SKYBRIDGE_REQUIRE_AUTH_PASSWORD=true
      # Should a nice index page be shown on the root URL?
      - SKYBRIDGE_SHOW_INDEX=false
      # Allow backfilling/scrolling on timelines? (can cause issues on instances under heavy load)
      - SKYBRIDGE_ALLOW_BACKFILL=true

volumes:
  skybridge:

Are there perhaps other dependencies or config changes I'd need to make to get a fresh instance running?

And of course, thank you so much for all the hard work!

@ObjectInSpace
Copy link

I'm in the same boat, it deployed okay but the image won't start. Here are my logs from fly.dev:

Configuring firecracker
2024-05-27T18:55:23.052 app[e825d3ef723028] ord [info] 2024-05-27T18:55:23.052593707 [01HYXPG3ZPRA3WA8RFB7SY8BVV:main] Running Firecracker v1.7.0
2024-05-27T18:55:23.222 app[e825d3ef723028] ord [info] [ 0.046637] PCI: Fatal: No config space access function found
2024-05-27T18:55:23.494 app[e825d3ef723028] ord [info] INFO Starting init (commit: d772ddd9)...
2024-05-27T18:55:23.517 app[e825d3ef723028] ord [info] INFO Mounting /dev/vdc at /app/database w/ uid: 0, gid: 0 and chmod 0755
2024-05-27T18:55:23.522 app[e825d3ef723028] ord [info] INFO Resized /app/database to 1056964608 bytes
2024-05-27T18:55:23.522 app[e825d3ef723028] ord [info] INFO Preparing to run: /app/entrypoint.sh as root
2024-05-27T18:55:23.531 app[e825d3ef723028] ord [info] ERROR Error: failed to spawn command: /app/entrypoint.sh: No such file or directory (os error 2)
2024-05-27T18:55:23.531 app[e825d3ef723028] ord [info] does /app/entrypoint.sh exist and is it executable?

Probably doing something wrong somewhere.

@Pikuboy
Copy link

Pikuboy commented Sep 4, 2024

Did one of you managed to make it work ? I have the same issues.

@Pikuboy
Copy link

Pikuboy commented Sep 5, 2024

I managed to make it work. Here's my fly.toml

app = 'skybridge'  #you need to rename it
primary_region = 'lhr'

[build]
image = "videah/skybridge:latest"

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0

[env]
  SKYBRIDGE_BASEURL = 'skybride.fly.dev' #you need to rename it using your app name .fly.dev
  SKYBRIDGE_SHOW_INDEX = 'true'
  FLY_SWAP = 'true'
  SKYBRIDGE_SECRET=' ' #you need to fill it, I taped random numbers and it worked
  SKYBRIDGE_REQUIRE_AUTH_PASSWORD = true
  SKYBRIDGE_AUTH_PASSWORD = '' #if above is true, it will be asked when you'll try to log in to you bsky account in the app
  SKYBRIDGE_ALLOW_BACKFILL = true

[[mounts]]
  source = 'skybridge_data'
  destination = '/app/database'

[[http_service.checks]]
  grace_period = "30s"
  interval = "30s"
  method = "GET"
  timeout = "5s"
  path = "/api/v2/instance"

[http_service.concurrency]
  type = "requests"
  hard_limit = 999999
  soft_limit = 9999

[[vm]]
  memory = '256mb'
  cpu_kind = 'shared'
  cpus = 1

@ObjectInSpace
Copy link

ObjectInSpace commented Oct 19, 2024

This configuration got me up and running. Thanks a lot!

One thing that really helped was using fly's github integration to launch and deploy the app. Fork the skybridge repo to your account, commit a change to fly.toml with your own configuration, then link your github to fly and launch from the web UI. No need to git clone or worry about dart_frog_cli version missmatches or anything like that, fly will just do everything so you don't need to copy anything to your local machine. Worked great, once I filled everything out correctly.

Make your repo private if you do this though, so no one can snoop on your configuration file. (not that anyone would, but, you know, can't be too careful.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants