Skip to content

Add a simple Procfile to serve static assets#155

Merged
patch0 merged 8 commits into
mainfrom
use-webrick-on-heroku
Aug 3, 2022
Merged

Add a simple Procfile to serve static assets#155
patch0 merged 8 commits into
mainfrom
use-webrick-on-heroku

Conversation

@patch0
Copy link
Copy Markdown
Contributor

@patch0 patch0 commented Aug 3, 2022

  • Sets a Procfile to use a Ruby HTTP server to serve up the app as a static site.
  • Adds a heroku-postbuild script in package.json which builds both the app and the web component. This takes precedence over build in the Heroku build process. This has a special env var of PUBLIC_URL set to an empty string so the webcomponent builds properly.
  • Adds a .dockerignore to make the docker build context smaller for faster local container rebuilds
  • Adds an app.json just to make the Heroku deployment a bit more in-keeping with other apps.

So this means that the review app is now served from https://editor-ui-pi-use-webric-wzk77h.herokuapp.com/ with a basic Ruby webserver, and then the webcomponent is at https://editor-ui-pi-use-webric-wzk77h.herokuapp.com/web-component.html 🎉

The main editor showing the sense hat working:

image

And the web-component:

image

Not sure this is great for production use, but it'll do.

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-webric-wzk77h August 3, 2022 10:26 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #655
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-webric-wzk77h August 3, 2022 10:35 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #656
  • Test coverage: 62%

This then builds both the web component and the app itself.
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-webric-wzk77h August 3, 2022 10:51 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-webric-wzk77h August 3, 2022 10:57 Inactive
@patch0 patch0 marked this pull request as ready for review August 3, 2022 11:00
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #658
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-webric-wzk77h August 3, 2022 11:14 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #659
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-webric-wzk77h August 3, 2022 11:49 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #660
  • Test coverage: 62%

Copy link
Copy Markdown
Contributor

@loiswells97 loiswells97 left a comment

Choose a reason for hiding this comment

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

Looks okay I think 👍

@patch0 patch0 merged commit 78fcf32 into main Aug 3, 2022
@patch0 patch0 deleted the use-webrick-on-heroku branch August 3, 2022 14:10
@patch0 patch0 restored the use-webrick-on-heroku branch February 26, 2026 15:04
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.

4 participants