Deploy to Heroku
This commit is contained in:
parent
b2cf1b2216
commit
bce39cf4cc
@ -1,11 +1,13 @@
|
|||||||
FROM gitea/gitea:1.14.5-rootless
|
FROM gitea/gitea:1.14.5-rootless
|
||||||
|
|
||||||
ARG APP_NAME
|
WORKDIR /app
|
||||||
ENV APP_NAME=${APP_NAME}
|
|
||||||
|
COPY heroku-app.txt /app/heroku-app.txt
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /app
|
|
||||||
COPY script.sh /app/script.sh
|
COPY script.sh /app/script.sh
|
||||||
|
|
||||||
RUN chmod +x /app/script.sh
|
RUN chmod +x /app/script.sh
|
||||||
|
|
||||||
ENTRYPOINT ./script.sh
|
ENTRYPOINT ./script.sh
|
21
deploy.sh
Normal file
21
deploy.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Create git repository if it doesn't exist
|
||||||
|
if [ ! -d ".git" ]; then
|
||||||
|
git init
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a new Heroku app
|
||||||
|
appName = $(heroku create --stack heroku-24 --region eu --json | jq -r '.name')
|
||||||
|
echo $appName > heroku-app.txt
|
||||||
|
|
||||||
|
# Add Heroku Postgres add-on
|
||||||
|
heroku addons:create heroku-postgresql:essential-0 --app s464863-gitea
|
||||||
|
|
||||||
|
# Push to Heroku
|
||||||
|
git add .
|
||||||
|
git commit -m "Deploy to Heroku"
|
||||||
|
git push heroku main
|
||||||
|
|
||||||
|
# Open the app in the browser
|
||||||
|
heroku open --app s464863-gitea
|
1
heroku-app.txt
Normal file
1
heroku-app.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
Loading…
Reference in New Issue
Block a user