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

chore: support docker-based deployment workflow #3

Merged
merged 4 commits into from
Feb 13, 2024
Merged

Conversation

dustin-jw
Copy link
Contributor

@dustin-jw dustin-jw commented Feb 12, 2024

Description

This work updates the deployment workflow to publish a docker image to the GitHub Container Registry instead of deploying to Heroku. It also sets up docker-compose configs and updates the Go version/dependencies.

To Validate

  1. Pull down this branch
  2. If you haven't already, copy .env-sample to .env and fill in the token values
  3. Run docker compose up, confirming that you see output confirming that you are connected to Slack and that Reaction Bot has started up
  4. Modify main.go to add another reaction using an emoji of your choice with a unique Name and reaction-bot-testing for the Channel
  5. Run docker compose build, then docker compose up to rebuild/restart the bot locally
  6. Use the emoji you specified in a Slack channel that has Reaction Bot, confirming that the message is posted to #reaction-bot-testing and that the Name you specified is logged to the console
  7. Check the workflow run for publishing the docker image, and make sure that the package is deployed
  8. Run docker compose -f docker-compose.prod.yml, confirming that it pulls the image and runs it (this will require a personal access token to access the registry)

Copy link
Member

@jonoliver jonoliver left a comment

Choose a reason for hiding this comment

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

Thanks Dustin, this works as expected. The only question I had was on the deploy docs.


```cli
docker pull ghcr.io/sparkbox/reaction-bot
docker compose up -d
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
docker compose up -d
docker compose -f docker-compose.prod.yml up -d

Should we be specifying the prod configuration here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My assumption was that we'll just have a .env file and docker-compose.yml that matches the prod config in the repo. I think that's more or less what we're doing with sparkpress.

@dustin-jw dustin-jw merged commit 853faca into main Feb 13, 2024
@dustin-jw dustin-jw deleted the chore--sparkboxqa branch February 13, 2024 19:39
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.

2 participants