Skip to content

feat: Publish docker#166

Merged
AverageHelper merged 20 commits intomainfrom
avg/publish-docker
Oct 3, 2024
Merged

feat: Publish docker#166
AverageHelper merged 20 commits intomainfrom
avg/publish-docker

Conversation

@AverageHelper
Copy link
Copy Markdown
Contributor

@AverageHelper AverageHelper commented Aug 24, 2024

We might as well publish our own Docker image. Would make deployment much easier if a host could simply write ghcr.io/byu-cs-discord/csbot in a compose.yml file, without having to clone and build directly.

New Docker deploy flow:

  • Every push to our main branch goes to an image tag called main
  • Every new SemVer repo tag goes to an image tag called x.x.x, x.x, x, and latest
  • latest is equivalent to the newest SemVer tag, while main is equivalent to the main branch
  • Latest SemVer image can be pulled from ghcr.io/byu-cs-discord/csbot:latest
  • We might additionally publish to our Codeberg mirror the same way, once I know this proof-of-concept works and I figure out how to matrix the secret key

Startup time is a bit slow during command deployment, but we can speed that up later with a smarter deployment solution (one that edits existing commands rather than strict redeploying, which I think would fix the issue with command permissions resetting each time).

Note also that we run database migrations on startup, too.

@AverageHelper AverageHelper added the enhancement New feature or request label Aug 24, 2024
@AverageHelper AverageHelper requested a review from a team August 24, 2024 23:13
@AverageHelper AverageHelper self-assigned this Aug 24, 2024
@AverageHelper AverageHelper enabled auto-merge (squash) August 24, 2024 23:19
Comment thread .github/workflows/deploy-docker.yml
@AverageHelper AverageHelper mentioned this pull request Aug 25, 2024
Comment thread .github/workflows/deploy-docker.yml
@AverageHelper AverageHelper requested a review from a team September 6, 2024 19:58
@AverageHelper AverageHelper enabled auto-merge (squash) September 6, 2024 20:01
@AverageHelper
Copy link
Copy Markdown
Contributor Author

Ok I think it's done now lol. Pending new reviews

JstnMcBrd
JstnMcBrd previously approved these changes Oct 3, 2024
Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
@JstnMcBrd JstnMcBrd disabled auto-merge October 3, 2024 17:01
Comment thread package.json
@AverageHelper AverageHelper requested review from a team and JstnMcBrd October 3, 2024 18:06
Copy link
Copy Markdown
Contributor

@JstnMcBrd JstnMcBrd left a comment

Choose a reason for hiding this comment

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

Excited to see this work when we release v0.13.0!

@AverageHelper AverageHelper merged commit 38d87bb into main Oct 3, 2024
@AverageHelper AverageHelper deleted the avg/publish-docker branch October 3, 2024 18:39
@AverageHelper
Copy link
Copy Markdown
Contributor Author

AverageHelper commented Oct 3, 2024

Looks like the package was marked private lol, but now that's fixed and I've confirmed that the ghcr.io/byu-cs-discord/csbot:main image works! Once #165 merges then we should have semver tags and :latest as well!!

EDIT: Well something went wrong idk what lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants