Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

FR: Enhance the Self Hosting docs #309

Open
prologic opened this issue Aug 5, 2023 · 11 comments
Open

FR: Enhance the Self Hosting docs #309

prologic opened this issue Aug 5, 2023 · 11 comments
Labels
fr Feature request

Comments

@prologic
Copy link

prologic commented Aug 5, 2023

What are you trying to do?

I'm trying to understand what parts of tier.run I can self-host and run myself. This part of the docs is not super clear. There is a "Self Hosting" section that links off to external resources and that's about it.

How should we solve this?

Please provide brief documentation on the "Self Hosting" section of the docs and/or README that make it clear what parts of tier.run you can self-host and run yourself. I assume this is the model builder? I'm not sure, hence the FR :)

What is the impact of not solving this?

Work-around: Follow the docs that do exist and see how things work.

Anything else?

Nope

@prologic prologic added the fr Feature request label Aug 5, 2023
@bmizerany
Copy link
Contributor

Tier may be run 100% self-hosted. Tier Cloud is a managed service with all of the same features and more to come.

@prologic
Copy link
Author

prologic commented Aug 5, 2023

How? This part isn't clear to me from the docs...

@kitchenbeats
Copy link

Agree with you prologic. The docs are not very clear on this. There are a few packages prebuilt, docker, fly and heroku, but no obvious docs on self hosting, or the OSS itself.

@prologic
Copy link
Author

Ideally:

  • Provider a Docker image on the Docker hub
  • A sample docker-compose.yml to run it

That should be enough IMO.

@bmizerany
Copy link
Contributor

Thank you for the feedback. Running the image like docker run tierrun/tier serve [args] should work. We'll look into updating docs. Images can be found here: https://www.tier.run/blog/official-tier-docker-images#

@lavievillethomas
Copy link

I try to launch Tier on docker

My docker-compose.yml :

version: '3' services: tierrun: image: tierrun/tier environment: STRIPE_API_KEY: "PRIVATE_KEY" volumes: - ./docker/tier/config.json:$HOME/.config/tier/config.json command: tier serve

But I have a same response :

`
Environment variables:

STRIPE_API_KEY
Stripe API key. If not set, the CLI will use
$HOME/.config/tier/config.json if present; otherwise an error will occur.
`

Do you have an issue for this ? Or an docker-compose example ?
Thanks !

@jahabeebs
Copy link

@prologic @lavievillethomas did you guys have luck with self-hosting? Unfortunately neither the Docker nor fly.io options are working for me for self-hosting. Tier.run is killing their cloud service so hoping there's a way...

Docker, instant crash (w/stripe key set):
failure

Fly.io, instant crash (w/stripe key set):
Screen Shot 2023-12-09 at 12 28 44 AM

@bmizerany
Copy link
Contributor

Can you share what command and env (secrets redacted) you're using?

@jahabeebs
Copy link

Can you share what command and env (secrets redacted) you're using?

Hi @bmizerany,

Thanks for your message. I'll try to be as detailed as possible with how I've tried deploying so far in Azure and Fly.io to see if there might be an obvious solution.

Azure

This is my experience trying to self-host with Azure, but if you think there's an easier way to deploy the Docker container let me know.

  1. Creating web app in Azure
step 1 create web app

Pulling the Docker image (startup command is blank for now, but I'll modify later)

step 1pt2

Enable public access

Screen Shot 2023-12-11 at 11 35 02 PM
  1. Container deployed, logs show immediate failure (maybe because Stripe key not set and it can't ping 8080 either)
Screen Shot 2023-12-11 at 11 42 27 PM
  1. Adding my live Stripe API key (same one I use in openmoderator.com that works with tier's api)
Screen Shot 2023-12-11 at 11 45 27 PM
  1. Verified in advanced tools that live key is set and try to re-deploy but immediate failure
Screen Shot 2023-12-11 at 11 51 06 PM Screen Shot 2023-12-11 at 11 54 07 PM
  1. maybe we can change the startup commands to pass in the env variable
Screen Shot 2023-12-11 at 11 56 56 PM
  1. stripe_api_key variable visible in logs, still crashes instantly
Screen Shot 2023-12-12 at 12 00 22 AM

Fly.io

  1. Run flyctl launch --no-deploy
Screen Shot 2023-12-12 at 12 07 59 AM
  1. Set Stripe live key as secret
Screen Shot 2023-12-12 at 12 08 57 AM
  1. Deploy with flyctl deploy command and fails instantly
Screen Shot 2023-12-12 at 12 12 25 AM
  1. Re-deploy and...maybe it's working? Same errors as before but the last message is that the health check works
Screen Shot 2023-12-12 at 12 17 10 AM
  1. Visited deployed URL (https://fly-tier.fly.dev/) and it was server not found

@bmizerany
Copy link
Contributor

For posterity: gordalina/fly-tier@83bc420

@jahabeebs
Copy link

Posting my docs here on standing up an NGINX proxy in front of an internal/private, hosted tier instance on Fly.io:

https://github.com/jahabeebs/fly-tier-run-nginx-proxy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fr Feature request
Projects
None yet
Development

No branches or pull requests

5 participants