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

🤖 Daggerize & deploy to Fly.io ✈️ #42

Merged
merged 1 commit into from
Oct 12, 2023
Merged

🤖 Daggerize & deploy to Fly.io ✈️ #42

merged 1 commit into from
Oct 12, 2023

Conversation

gerhard
Copy link
Member

@gerhard gerhard commented Oct 10, 2023

TL;DR the app is currently running as https://changelog-nightly-2023-10-10.fly.dev/

This adds everything needed to run this app on Fly.io:

  • a Dagger pipeline captured as Go code
  • GitHub Actions workflow that runs the Dagger pipeline
  • nginx.conf used to serve the static files
  • supercronic to run the crontab (now versioned in this repo!)
    • includes Sentry.io cron integration via SENTRY_DSN
  • Procfile support so that the Fly app runs both nginx & supercronic
    • hi foreman, old friend!
  • 1Password service account integration

A good command to start with is dagger run go run . build

Use the --debug flag to build a local image. Requires OP_SERVICE_ACCOUNT_TOKEN to be set. FWIW: https://developer.1password.com/docs/service-accounts/get-started

The local image will be exported to tmp/image.tar. Test it locally by running:

docker load -i tmp/image.tar
docker run --rm -p 8081:80 -it <sha256:...>

To see all available options, run: dagger run go run .

This was done part of thechangelog/changelog.com#480


Follow-ups

@gerhard gerhard force-pushed the daggerize branch 7 times, most recently from d8db933 to 17b523d Compare October 12, 2023 14:19
@gerhard gerhard marked this pull request as ready for review October 12, 2023 14:24
TL;DR the app is currently running as https://changelog-nightly-2023-10-10.fly.dev/

This adds everything needed to run this app on Fly.io:
- [x] a Dagger pipeline captured as Go code
- [x] GitHub Actions workflow that runs the Dagger pipeline
- [x] `nginx.conf` used to serve the static files
- [x] `supercronic` to run the `crontab` (now versioned in this repo!)
  - includes Sentry.io cron integration via `SENTRY_DSN`
- [x] `Procfile` support so that the Fly app runs both nginx & supercronic
  - hi `foreman`, old friend!
- [x] 1Password service account integration

A good command to start with is `dagger run go run . build`

Use the `--debug` flag to build a local image. Requires
`OP_SERVICE_ACCOUNT_TOKEN` to be set. FWIW:
https://developer.1password.com/docs/service-accounts/get-started

The local image will be exported to `tmp/image.tar`. Test it locally by
running:

  docker load -i tmp/image.tar
  docker run --rm -p 8081:80 -it <sha256:...>

To see all available options, run: `dagger run go run .`

This was done part of thechangelog/changelog.com#480

Follow-ups:
- Remove Buffer
- Update Ruby to a supported version
  - https://endoflife.date/ruby + https://hub.docker.com/_/ruby/tags
- Extract Daggerverse modules

Signed-off-by: Gerhard Lazu <[email protected]>
@gerhard gerhard requested a review from jerodsanto October 12, 2023 16:02
@jerodsanto jerodsanto merged commit c5b0c1f into master Oct 12, 2023
1 check passed
@jerodsanto jerodsanto deleted the daggerize branch October 12, 2023 16:17
gerhard added a commit that referenced this pull request Oct 12, 2023
Follow-up to #42

Signed-off-by: Gerhard Lazu <[email protected]>
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