# HG changeset patch # User Jason Klinger # Date 1692734752 -3600 # Node ID 8f797bb7ccb3dfc0e730653b226264ff9ed39dcd # Parent af48cbdc0be0fb6290520dd950c512fcdd267e59 INV-470: Added script to anonymize inventory db. diff -r af48cbdc0be0 -r 8f797bb7ccb3 prod/anon-inventory.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prod/anon-inventory.sh Tue Aug 22 21:05:52 2023 +0100 @@ -0,0 +1,28 @@ +# +# Copyright (c) 2023. Ohio Department of Education. - All Rights Reserved. +# Unauthorized copying of this file, in any medium, is strictly prohibited. +# Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/) +# +# + +#!/bin/bash + +#!/bin/bash +# +BASEDIR="$PWD" +# read required environment variables +source $BASEDIR/.env/ssdt-inventory-shared.properties +source $BASEDIR/.env/ssdt-inventory-import.properties +# +# docker login +echo "Attempting to login to $artifactUrl" +docker login $artifactUrl -u $artifactUser -p $artifactPassword +# docker pull +echo "Attempting to pull inventory-anon:1.0.0" +docker pull $artifactUrl/inventory-anon:1.0.0 +# +dockerParams="--rm --name $entityId-inventory-anonapp --network $entityId-inventory-net" +dockerParams="$dockerParams -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-inventory-db:5432/invdb -e SPRING_DATASOURCE_PASSWORD=postgres" +dockerParams="$dockerParams -e SPRING_PROFILES_ACTIVE=prod -i inventory-anon:1.0.0" +echo "Executing docker run command" +docker run $dockerParams \ No newline at end of file