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

add heroku 1-click deployment files #383

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rohitdash08
Copy link

@rohitdash08 rohitdash08 commented Oct 21, 2024

This PR fixes #341

What kind of change does this PR introduce?

This PR introduces a feature that adds a Heroku 1-click deployment option using Docker. It includes configuration files such as app.json, heroku.yml, Dockerfile, and scripts for seamless deployment on Heroku using containers.

Why was this change needed?

This change was needed to simplify the deployment process for Postiz users. By introducing a Heroku 1-click deployment option, users can deploy the platform faster without manually configuring.

Other information:

I just gave it a try as it was pending for a long time, someone else is assigned to it but he's away for so long,

Checklist:

Put a "X" in the boxes below to indicate you have followed the checklist;

  • I have read the CONTRIBUTING guide.
  • I checked that there were not similar issues or PRs already open for this.
  • This PR fixes just ONE issue (do not include multiple issues or types of change in the same PR) For example, don't try and fix a UI issue and include new dependencies in the same PR.

Copy link

vercel bot commented Oct 21, 2024

@rohitdash08 is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

@jamesread
Copy link
Collaborator

Hey @rohitdash08 , thanks for the PR, I can see you've put some work into this.

I am worried about maintaining this going forward, as it duplicates another Dockerfile, another supervisord config, and similar. It also annoys me that ".deploy" is a weird name for a directory for Heroku!

  1. Can Heroku just deploy existing container images? I would much rather a "1 click deploy" for the existing container images, as it's wayyy less to maintain going forward.
  2. Can Heroku use something like a .heroku directory? .deploy is very generic.

@rohitdash08
Copy link
Author

Hi @jamesread, I have made the changes can you please have a look?

Copy link
Collaborator

@jamesread jamesread left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR, but there are several changes you've made that I've left code review comments for.

Overall I'm not confident that these changes will actually work - did you test the deployment?

if [[ "$SKIP_CONFIG_CHECK" != "true" ]]; then
echo "Entrypoint: Copying /config/postiz.env into /app/.env"

cp -vf /app/supervisord_available_configs/caddy.conf /etc/supervisor.d/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing these lines will break the existing docker containers.

@@ -2,13 +2,33 @@

set -o xtrace

export DATABSAE_URL=${DATABASE_URL:-$HEROKU_POSTGRESQL_DATABASE_URL}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for the database should be handled on the platform level.

if [ ! -f /config/postiz.env ]; then
echo "Entrypoint: WARNING: No postiz.env file found in /config/postiz.env"
fi

ln -sf /app/supervisord_available_configs/frontend.conf /etc/supervisor.d/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with this line.

@@ -17,6 +37,12 @@ if [[ "$POSTIZ_APPS" -eq "" ]]; then
POSTIZ_APPS="frontend workers cron backend"
fi

if [[$POSTIZ_APPS == *"workers"* ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines just look wrong.


build:
docker:
web: ghcr.io/gitroomhq/postiz-app-enterprise:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't use the enterprise containers.

"description": "Secret key for JWT tokens",
"generator": "secret"
},
"ADMIN_PASSWORD": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

"description": "REDIS_URL for Redis connection",
"required": true
},
"APP_URL": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this used?

@@ -64,6 +64,9 @@ jobs:
docker tag ghcr.io/gitroomhq/postiz-devcontainer-enterprise:${{ env.CONTAINERVER }} ghcr.io/gitroomhq/postiz-devcontainer-enterprise:latest
docker push ghcr.io/gitroomhq/postiz-devcontainer-enterprise:latest

docker tag localhost/postiz ghcr.io/gitroomhq/postiz-app-enterprise:latest
docker push ghcr.io/gitroomhq/postiz-app-enterprise:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the enterprise container workflows.

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

Successfully merging this pull request may close these issues.

Create an Heruku 1-click deployment using docker
2 participants