Skip to content

Use public url instead of s3 bucket#154

Merged
patch0 merged 19 commits into
mainfrom
use-public-url-instead-of-s3-bucket
Aug 3, 2022
Merged

Use public url instead of s3 bucket#154
patch0 merged 19 commits into
mainfrom
use-public-url-instead-of-s3-bucket

Conversation

@patch0
Copy link
Copy Markdown
Contributor

@patch0 patch0 commented Aug 2, 2022

Use the PUBLIC_URL env var to set URLs for the various bundles, shims, replacing REACT_APP_S3_BUCKET to allow assets to be served from sub directories in our S3 bucket.

Blocked by #152

  • Moves web component port to 3001 from 9000 to avoid clashes with auth
  • Replace REACT_APP_S3_BUCKET with PUBLIC_URL everywhere
  • Rename the web-component bundle.js to web-component.js
  • Use the Webpack HTML plugin to build the web component index.html as web-component.html, and inject the bundle correctly into the body.
  • The web-component index is now build/web-component.html.
  • Adds Cypress tests to GH actions
  • Add a delay to CircleCI to start cypress only after the services had started.

The web component works, served straight from S3, picking up the asset paths correctly:

https://python-editor-dist-test.s3.eu-west-2.amazonaws.com/previews/use-public-url-instead-of-s3-bucket/web-component.html

However, the editor itself does not, because it makes the assumption it is being served form the root directory. I think that is too big to cover off in this PR, and maybe we should address it in a different way.

https://python-editor-dist-test.s3.eu-west-2.amazonaws.com/previews/use-public-url-instead-of-s3-bucket/index.html

patch0 added 2 commits August 1, 2022 15:04
This is for the development environment, so the webpack component can
snarf anything from the main react UI app.
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 08:28 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 08:29 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 08:30 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 08:36 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #632
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 10:45 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #633
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 10:56 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #635
  • Test coverage: 62%

@patch0 patch0 marked this pull request as ready for review August 2, 2022 11:31
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #639
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:01 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #640
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:07 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:09 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:10 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:11 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:12 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #645
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:22 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 2, 2022 16:27 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #647
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 3, 2022 07:59 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #648
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 3, 2022 08:03 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #649
  • Test coverage: 62%

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-ui-pi-use-public-j7avrf August 3, 2022 08:07 Inactive
@raspberrypigithubbot
Copy link
Copy Markdown

  • CircleCI build #650
  • 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 to me I think

@patch0 patch0 merged commit b75e496 into main Aug 3, 2022
@patch0 patch0 deleted the use-public-url-instead-of-s3-bucket branch March 27, 2023 17:13
@patch0 patch0 restored the use-public-url-instead-of-s3-bucket 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