Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Build docker image for privacy center #1165

Merged
merged 5 commits into from
Aug 30, 2022
Merged

Conversation

sanders41
Copy link
Contributor

@sanders41 sanders41 commented Aug 26, 2022

Purpose

Create a docker image for the privacy center that can be published to docker hub.

I will updated docs etc once we are sure this is how we want things to work. For now to test cd to the privacy-center directory and build the container. docker build -t privacy-center-test .. Then run the container docker run --rm -p 3000:3000 privacy-center-test:latest and navigate the http://localhost:3000 to verify things are running.

Then in some other directory i.e. ~/test create a config folder then inside there create the following files:

  • config.css
/* Add global CSS overrides to this file */
:root:root {
  /* Changes the text color to red */
  --chakra-colors-gray-600: #f00;

  /* Changes the background color to blue */
  --chakra-colors-gray-50: #00f;
}
  • config.json
{
  "title": "Take control of your data",
  "description": "When you use our services, you’re trusting us with your information. We understand this is a big responsibility and work hard to protect your information and put you in control.",
  "fidesops_host_development": "http://localhost:8080/api/v1",
  "fidesops_host_production": "",
  "logo_path": "/logo.svg",
  "actions": [
    {
      "policy_key": "download",
      "icon_path": "/download.svg",
      "title": "Download your data",
      "description": "We will email you a report of the data related to your account.",
      "identity_inputs": {
        "name": "optional",
        "email": "required",
        "phone": "optional"
      }
    },
    {
      "policy_key": "delete",
      "icon_path": "/delete.svg",
      "title": "Delete your data",
      "description": "We will delete all of your account data. This action cannot be undone.",
      "identity_inputs": {
        "name": "optional",
        "email": "required",
        "phone": "optional"
      }
    }
  ]
}

Then from within the test directory start the container with a volume mount docker run --rm -v $(pwd)/config:/app/config -p 3000:3000 privacy-center-test:latest. Navigate to http://localhost:3000 again and the privacy center should load, but with different colors this time.

Changes

  • Added a Dockerfile in the privacy-center directory
  • Added a script to start the privacy center in docker

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #1094

@seanpreston seanpreston self-assigned this Aug 26, 2022
@seanpreston
Copy link
Contributor

Thanks @sanders41 — this approach looks good

@sanders41 sanders41 marked this pull request as ready for review August 30, 2022 14:44
@sanders41 sanders41 requested a review from a team August 30, 2022 14:51
@@ -43,3 +43,30 @@ jobs:
- name: Push Prod Tags
if: steps.check-tag.outputs.match == 'true'
run: nox -s "push(prod)"
push-fidesops-privacy-center-image:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the Github documentation on this, but don't have any way to actually test it.

Comment on lines 54 to 55
username: ${{ env.DOCKER_USER }} # Needs updating for fidesops privacy center
password: ${{ env.DOCKER_TOKEN }} # Needs updating for fidesops privacy center
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These will need to be updated for ethyca/fidesops-privacy-center on docker hub

Copy link
Contributor

@seanpreston seanpreston left a comment

Choose a reason for hiding this comment

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

Thanks

@seanpreston seanpreston merged commit 92dfd79 into main Aug 30, 2022
@seanpreston seanpreston deleted the ps-privacy-center-docker branch August 30, 2022 17:45
sanders41 added a commit that referenced this pull request Sep 22, 2022
* Build docker image for privacy center

* Update docs and add docker publish to workflow

* Update CHANGELOG

* Move privacy center docker publish to its own workflow

Co-authored-by: Paul Sanders <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish a standard Fides Privacy Center image to simplify deployment
2 participants