From 88a1e03e4cea6b148db28e4dfc2d5c64a531564e Mon Sep 17 00:00:00 2001 From: Allison King Date: Thu, 21 Jul 2022 15:57:29 -0400 Subject: [PATCH 1/4] Update frontend build path to be more descriptive --- .gitignore | 2 +- clients/admin-ui/package.json | 2 +- src/fidesctl/api/routes/util.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c2ed8d7e5a..135e49e503 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ fidesctl/api/src/main/resources/application.conf docs/fides/docs/api/openapi.json docs/fides/docs/schemas/config_schema.json -fidesctl/api/build/static +ui-build/ ## generic files to ignore *~ diff --git a/clients/admin-ui/package.json b/clients/admin-ui/package.json index 30db53b04a..e5bddc2d1a 100644 --- a/clients/admin-ui/package.json +++ b/clients/admin-ui/package.json @@ -14,7 +14,7 @@ "analyze:server": "cross-env BUNDLE_ANALYZE=server next build", "analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build", "export": "next build && next export", - "copy-export": "rsync -a --delete out/ ../../src/fidesctl/api/build/static/", + "copy-export": "rsync -a --delete out/ ../../src/ui-build/static/admin/", "prod-export": "npm run export && npm run copy-export", "cy:open": "cypress open", "cy:run": "cypress run", diff --git a/src/fidesctl/api/routes/util.py b/src/fidesctl/api/routes/util.py index 23c720f255..c73f640957 100644 --- a/src/fidesctl/api/routes/util.py +++ b/src/fidesctl/api/routes/util.py @@ -7,7 +7,8 @@ from fidesctl.api.utils.api_router import APIRouter API_PREFIX = "/api/v1" -WEBAPP_DIRECTORY = Path("src/fidesctl/api/build/static") +FRONTEND_BUILD_DIRECTORY = Path("src/ui-build/static") +WEBAPP_DIRECTORY = FRONTEND_BUILD_DIRECTORY / "admin" WEBAPP_INDEX = WEBAPP_DIRECTORY / "index.html" From c639c481a629a16ac64071523697178097ee049a Mon Sep 17 00:00:00 2001 From: Allison King Date: Thu, 21 Jul 2022 16:02:57 -0400 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2c68a83d6..4d19467a19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ The types of changes are: * Update `fideslang` to `1.1.0`, simplifying the default taxonomy and adding `tags` for resources [#865](https://github.com/ethyca/fides/pull/865) * Remove the `obscure` requirement from the `generate` endpoint [#819](https://github.com/ethyca/fides/pull/819) * Merge existing configurations with `fideslib` library [#913](https://github.com/ethyca/fides/pull/913) +* Moved frontend static files to `src/ui-build/static` [#934](https://github.com/ethyca/fides/pull/934) ### Developer Experience From 894b61b5e9bd8ee0ea53e81f63408e3f1e468061 Mon Sep 17 00:00:00 2001 From: Allison King Date: Fri, 22 Jul 2022 11:41:19 -0400 Subject: [PATCH 3/4] Update dockerignore --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index ed0abc3dfa..22d643db43 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ build/ dist/ src/fidesctl.egg-info/ +src/ui-build/ # Ignore Python-Specific Files .mypy_cache/ From e9cc27728b8473b333b118a3102f46e0323d435c Mon Sep 17 00:00:00 2001 From: Allison King Date: Fri, 22 Jul 2022 16:15:34 -0400 Subject: [PATCH 4/4] Update dockerfile reference paths --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75a9f90779..31e798ac99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,7 +91,7 @@ ENV PYTHONUNBUFFERED=TRUE ENV RUNNING_IN_DOCKER=TRUE # Make a static files directory -RUN mkdir -p src/fidesctl/api/build/static +RUN mkdir -p src/ui-build/static/admin EXPOSE 8080 CMD ["fidesctl", "webserver"] @@ -116,4 +116,4 @@ RUN python setup.py sdist RUN pip install dist/fidesctl-*.tar.gz # Copy frontend build over -COPY --from=frontend /fides/clients/admin-ui/out/ /fides/src/fidesctl/api/build/static/ +COPY --from=frontend /fides/clients/admin-ui/out/ /fides/src/ui-build/static/admin/