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

Deployable to Deta #427

Open
BarrenWardo opened this issue Nov 7, 2022 · 5 comments
Open

Deployable to Deta #427

BarrenWardo opened this issue Nov 7, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@BarrenWardo
Copy link

Is your feature request related to a problem? Please describe.
Heroku is closing it's free tier. So, is it possible to make it deployable on Deta.sh

Describe the solution you'd like
It would be very much helpful if it can be deployed on Deta.sh with single click script.

--
Thank you & love your work. Hoping to get a positive response.

@BarrenWardo BarrenWardo added the enhancement New feature or request label Nov 7, 2022
@birdup000
Copy link
Collaborator

Hi can you test the script.

#!/bin/bash

set -e

echo "Node Version: $(node -v)"
echo "Yarn Version: $(yarn -v)"

if [ ! -f .env ]
then
  echo "Generating .env file..."

  ENV="develop"

  echo "Preparing your keys from https://my.telegram.org/"
  read -p "Enter your TG_API_ID: " TG_API_ID
  read -p "Enter your TG_API_HASH: " TG_API_HASH

  echo "ENV=$ENV" > .env
  echo "TG_API_ID=$TG_API_ID" >> .env
  echo "TG_API_HASH=$TG_API_HASH" >> .env
fi

export $(cat .env | xargs)

echo
echo "Install dependencies..."
yarn install

echo
echo "Build..."
yarn workspaces run build

echo
echo "Deploy to Deta.sh..."
deta deploy

This script assumes that you have already set up a Deta.sh account and initialized a Deta micro. It also assumes that you have set up a Git remote named origin for your repository.

To use this script, simply copy and paste it into a file named deploy.sh in the root directory of your project. Then, make sure the file is executable (chmod +x deploy.sh) and run it with ./deploy.sh.

This script will generate a .env file if it doesn't already exist, prompt you to enter your Telegram API ID and hash, install dependencies, build your project, and deploy it to Deta.sh with the default settings. You can customize the deployment options by modifying the deta deploy command.

@birdup000
Copy link
Collaborator

Space.sh will be implemented since deta.sh is discontinuing the deta cli in but will will be called deta.space

@stepersy
Copy link

Is it possible to make a tutorial? Thanks!

@birdup000
Copy link
Collaborator

Is it possible to make a tutorial? Thanks!

Sorry still not finished yet just started working on support for deta.space

@birdup000
Copy link
Collaborator

I'll create tutorial when support has been added

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants