-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upd: Setup playground for consent BB
Signed-off-by: George J Padayatti <[email protected]>
- Loading branch information
1 parent
d3f0763
commit 0d723ff
Showing
7 changed files
with
212 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
api-backup.json |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.DEFAULT_GOAL := help | ||
.PHONY: help | ||
help: | ||
@echo "------------------------------------------------------------------------" | ||
@echo "BB Consent Playground" | ||
@echo "------------------------------------------------------------------------" | ||
@grep -E '^[0-9a-zA-Z_/%\-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
run: ## Run the playground | ||
docker-compose up -d | ||
|
||
down: ## Stop the playground | ||
docker-compose down | ||
|
||
clean: ## Stop and destroy volumes | ||
docker-compose down -v |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1 align="center"> | ||
GovStack Consent BB Playground | ||
</h1> | ||
|
||
## About | ||
|
||
This repository hosts docker compose files for setting up playground for Consent BB. | ||
|
||
## Requirements | ||
|
||
- docker: `>=23.0.3` | ||
- docker-compose: `>=2.6.1` | ||
|
||
## Steps to run | ||
|
||
1. Execute `make run`. This sets up the necessary dependencies and configurations for running playground. | ||
2. Execute `make down`. This stops the playground without deleting the data (volumes). | ||
3. Execute `make clean`. This stops the playground along with deleting the data (volumes). | ||
|
||
## Contributing | ||
|
||
Feel free to improve the plugin and send us a pull request. If you find any problems, please create an issue in this repo. | ||
|
||
## Licensing | ||
|
||
Copyright (c) 2023-25 LCubed AB (iGrant.io), Sweden | ||
|
||
Licensed under the Apache 2.0 License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specific language governing permissions and limitations under the License. |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"baseUrl": "https://api.bb-consent.dev/v2", | ||
"appVersion": "2023.11.6", | ||
"clientId": "igrant-ios-app" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"DataBase": { | ||
"hosts": ["mongo"], | ||
"name": "bb-consent-consentdb", | ||
"username": "bb-consent-user", | ||
"password": "bb-consent-password" | ||
}, | ||
"ApplicationMode": "single-tenant", | ||
"Organization": { | ||
"name": "Skatteverket", | ||
"location": "Sweden", | ||
"description": "Skatteverket is committed to safeguarding your privacy. We process your personal data in line with data agreements, ensuring adherence to ISO27560 standards and legal frameworks like GDPR. For every personal data we process, you can view its usage purpose and make informed choices to opt in or out. For inquiries, contact our Data Protection Officer at [email protected]", | ||
"eulaUrl": "https://www.skatteverket.se" | ||
}, | ||
"User": { | ||
"username": "[email protected]", | ||
"password": "qwerty123" | ||
}, | ||
"ApiSecretKey": "samplekey", | ||
"Iam": { | ||
"url": "http://keycloak:8080", | ||
"realm": "BB-Consent-Users", | ||
"ClientId": "igrant-ios-app", | ||
"AdminUser": "admin", | ||
"AdminPassword": "admin", | ||
"timeout": 5 | ||
}, | ||
"Smtp": { | ||
"username": "[email protected]", | ||
"password": "xwtq", | ||
"host": "smtp.gmail.com", | ||
"port": 587, | ||
"adminEmail": "[email protected]" | ||
}, | ||
"Webhooks": { | ||
"events": ["consent.allowed", "consent.disallowed"] | ||
}, | ||
"PrivacyDashboardDeployment": { | ||
"Hostname": "https://privacy.bb-consent.dev", | ||
"Version": "v2023.11.6" | ||
}, | ||
"Policy": { | ||
"Name": "Policy 1", | ||
"Url": "https://www.skatteverket.se", | ||
"IndustrySector": "Public", | ||
"GeographicRestriction": "Sweden", | ||
"StorageLocation": "Sweden" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
version: "3.7" | ||
|
||
services: | ||
nginx-proxy: | ||
image: jwilder/nginx-proxy | ||
container_name: nginx-proxy | ||
restart: always | ||
ports: | ||
- "443:443" | ||
volumes: | ||
- /var/run/docker.sock:/tmp/docker.sock:ro | ||
- ./../resources/ssl/development/scripts/docker-proxy/certs:/etc/nginx/certs:ro | ||
- ./../resources/ssl/development/scripts/docker-proxy/vhost.d:/etc/nginx/vhost.d:ro | ||
- ./../resources/ssl/development/scripts/docker-proxy/proxy.conf:/etc/nginx/proxy.conf:ro | ||
|
||
mongo: | ||
image: bitnami/mongodb:7.0 | ||
container_name: mongo | ||
environment: | ||
- MONGODB_DATABASE=bb-consent-consentdb | ||
- MONGODB_USERNAME=bb-consent-user | ||
- MONGODB_PASSWORD=bb-consent-password | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
volumes: | ||
- mongo:/bitnami/mongodb | ||
ports: | ||
- "27018:27017" | ||
depends_on: | ||
- nginx-proxy | ||
|
||
postgresql: | ||
image: bitnami/postgresql:14.10.0 | ||
container_name: postgresql | ||
environment: | ||
- POSTGRESQL_USERNAME=bn_keycloak | ||
- POSTGRESQL_PASSWORD=bn_keycloak | ||
- POSTGRESQL_DATABASE=bitnami_keycloak | ||
volumes: | ||
- postgresql:/bitnami/postgresql | ||
ports: | ||
- "5432:5432" | ||
depends_on: | ||
- nginx-proxy | ||
|
||
keycloak: | ||
image: docker.io/bitnami/keycloak:22.0.2-debian-11-r0 | ||
container_name: keycloak | ||
restart: always | ||
environment: | ||
- KEYCLOAK_ADMIN_USER=admin | ||
- KEYCLOAK_ADMIN_PASSWORD=admin | ||
- KEYCLOAK_DATABASE_HOST=postgresql | ||
- KEYCLOAK_DATABASE_PASSWORD=bn_keycloak | ||
- KEYCLOAK_HTTP_RELATIVE_PATH=/ | ||
- KEYCLOAK_ENABLE_HTTPS=false | ||
- KEYCLOAK_ENABLE_STATISTICS=false | ||
- KEYCLOAK_HTTP_PORT=8080 | ||
- KEYCLOAK_LOG_OUTPUT=default | ||
- KEYCLOAK_PRODUCTION=false | ||
- KEYCLOAK_PROXY=edge | ||
ports: | ||
- "9090:8080" | ||
depends_on: | ||
- postgresql | ||
- nginx-proxy | ||
|
||
api: | ||
image: igrantio/bb-consent-api:2023.11.15 | ||
container_name: api | ||
restart: always | ||
environment: | ||
- VIRTUAL_HOST=api.bb-consent.dev | ||
volumes: | ||
- ./api.json:/opt/bb-consent/api/config/config-production.json:ro | ||
depends_on: | ||
- mongo | ||
- keycloak | ||
- nginx-proxy | ||
|
||
admin-dashboard: | ||
image: igrantio/bb-consent-admin-dashboard:2023.11.6 | ||
container_name: admin-dashboard | ||
restart: always | ||
environment: | ||
- VIRTUAL_HOST=dashboard.bb-consent.dev | ||
volumes: | ||
- ./admin-dashboard.json:/usr/share/nginx/html/config/config.json:ro | ||
depends_on: | ||
- api | ||
- nginx-proxy | ||
|
||
privacy-dashboard: | ||
image: igrantio/bb-consent-privacy-dashboard:2023.11.6 | ||
container_name: privacy-dashboard | ||
restart: always | ||
environment: | ||
- VIRTUAL_HOST=privacy.bb-consent.dev | ||
volumes: | ||
- ./privacy-dashboard.json:/usr/share/nginx/html/config/config.json:ro | ||
depends_on: | ||
- api | ||
- nginx-proxy | ||
|
||
volumes: | ||
mongo: | ||
postgresql: |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"baseUrl": "https://api.bb-consent.dev/v2", | ||
"redirectUrl": "https://privacy.bb-consent.dev/login", | ||
"clientId": "igrant-ios-app" | ||
} |