Files
backstage/contrib/docker/frontend-with-nginx
Ben Chidgey 7e2c0bc96f FIX: Stop sed escaping numbers 2 and 7 in Docker
An interesting edge case has come up whilst using BackStage.

When using the example frontend-with-nginx work to run a separate
frontend, whilst then providing an override for the
googleAnalyticsTrackingId in yaml config via
APP_CONFIG_app_googleAnalyticsTrackingId. I received an "Octal escape
sequences are not allowed in strict mode" error in the browser dev
console.

After looking into it it appears that the sed used escapes the numbers 2
and 7 if they are present in an APP_CONFIG_* ENV override value.
I happened to have both a 2 and a 7 in my GA ids, hence the edge case
part!

Of note this did not happen on my mac but it is present inside of the
nginx:mainline Docker container used in the example.

This fix simply removes the hex from the sed substitution regex and
replaces it with a single quote '

Signed-off-by: Ben Chidgey <ben@feedmypixel.com>
2021-09-23 17:34:54 +01:00
..

Frontend with NGINX

This folder contains Docker images that let you run the Backstage frontend as a separate image, rather than having it served through the app-backend plugin from the backend.

Note that when running the frontend like this, the app configuration becomes embedded into the actual static JavaScript files at build time. This means that you will have to supply the list of configuration files as part of the command line at build.

Usage

There are two variants: one that builds inside Docker, and one that builds on the host. See the comments at the top of the individual dockerfiles for usage instructions.