-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add the UI to the compose deployment #757
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
87b0e4f
Add the UI to the compose deployment
ThomasLaPiana 973a5a2
checkpoint
ThomasLaPiana 0cc724d
fix the sorting and app running
ThomasLaPiana 5bab235
fix ci checks
ThomasLaPiana db88c05
docs updates for changed nox commands
ThomasLaPiana 4179e99
fixed the UI configuration to support local or docker deployment
ThomasLaPiana 349cf5b
update the changelog
ThomasLaPiana 5e08450
add a workaround for building images without other dev requirements
ThomasLaPiana 5047b1e
Merge branch 'main' into ThomasLaPiana-compose-ui-deployment
ThomasLaPiana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
NEXT_PUBLIC_FIDESCTL_API=/api/v1 | ||
NEXT_PUBLIC_FIDESCTL_API=/api/v1 | ||
NEXT_PUBLIC_FIDESCTL_API_SERVER=http://0.0.0.0:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
NEXT_PUBLIC_FIDESCTL_API=/api/v1 | ||
NEXT_PUBLIC_FIDESCTL_API=/api/v1 | ||
NEXT_PUBLIC_FIDESCTL_API_SERVER=http://0.0.0.0:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,18 @@ | ||
"""Contains the nox sessions for running development environments.""" | ||
import nox | ||
from constants_nox import ( | ||
COMPOSE_FILE, | ||
IMAGE_NAME, | ||
INTEGRATION_COMPOSE_FILE, | ||
RUN, | ||
START_APP, | ||
) | ||
from docker_nox import build_local | ||
from constants_nox import RUN, START_APP_EXTERNAL, START_APP_UI | ||
from docker_nox import build | ||
|
||
|
||
@nox.session() | ||
def reset_db(session: nox.Session) -> None: | ||
"""Reset the database.""" | ||
build_local(session) | ||
def dev(session: nox.Session) -> None: | ||
"""Spin up the entire application and open a development shell.""" | ||
build(session, "dev") | ||
build(session, "ui") | ||
session.notify("teardown") | ||
session.run(*START_APP, external=True) | ||
reset_db_command = (*RUN, "fidesctl", "db", "reset", "-y") | ||
session.run(*reset_db_command, external=True) | ||
|
||
|
||
@nox.session() | ||
def api(session: nox.Session) -> None: | ||
"""Spin up the webserver.""" | ||
build_local(session) | ||
session.notify("teardown") | ||
run_in_background = ("docker-compose", "up", IMAGE_NAME) | ||
session.run(*run_in_background, external=True) | ||
|
||
|
||
@nox.session() | ||
def admin_ui(session: nox.Session) -> None: | ||
"""Spin up the frontend server in development mode""" | ||
npm_install = ("npm", "install") | ||
npm_run = ("npm", "run", "dev") | ||
with session.chdir("clients/admin-ui"): | ||
session.run(*npm_install, external=True) | ||
session.run(*npm_run, external=True) | ||
|
||
|
||
@nox.session() | ||
def cli(session: nox.Session) -> None: | ||
"""Spin up a local development shell.""" | ||
build_local(session) | ||
session.notify("teardown") | ||
session.run(*START_APP, external=True) | ||
run_shell = (*RUN, "/bin/bash") | ||
session.run(*run_shell, external=True) | ||
|
||
|
||
@nox.session() | ||
def cli_integration(session: nox.Session) -> None: | ||
"""Spin up a local development shell with integration images spun up.""" | ||
build_local(session) | ||
session.notify("teardown") | ||
session.run( | ||
"docker-compose", | ||
"-f", | ||
COMPOSE_FILE, | ||
"-f", | ||
INTEGRATION_COMPOSE_FILE, | ||
"up", | ||
"-d", | ||
IMAGE_NAME, | ||
external=True, | ||
) | ||
if session.posargs == ["external"]: | ||
session.run(*START_APP_EXTERNAL, external=True) | ||
else: | ||
session.run(*START_APP_UI, external=True) | ||
run_shell = (*RUN, "/bin/bash") | ||
session.run(*run_shell, external=True) | ||
|
||
|
||
@nox.session() | ||
def db_up(session: nox.Session) -> None: | ||
"""Spin up the application database in the background.""" | ||
run_command = ("docker-compose", "up", "-d", "fidesctl-db") | ||
session.run(*run_command, external=True) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running
nox -s dev
doesn't work from scratch, and I think it's because there's no equivalent of these lines anymore. We have the Dockerfile npm install those deps vanish when the container tries to run. I think that happens because the compose volume shadows the files in the image 🥷 which means an npm install has to happen after build. (Only about 75% sure that's what's up.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ssangervasi I think you're on the money here, so it does actually require a local
npm install
first then it seems.We should definitely pop open a ticket for this