Deployable to Deta
BarrenWardo opened this issue · 5 comments
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.
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.
Space.sh will be implemented since deta.sh is discontinuing the deta cli in but will will be called deta.space
Is it possible to make a tutorial? Thanks!
Is it possible to make a tutorial? Thanks!
Sorry still not finished yet just started working on support for deta.space
I'll create tutorial when support has been added