Mercurial > public > ssdt-docker
comparison prod/anon-inventory.sh @ 423:8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
author | Jason Klinger <klinger@nwoca.org> |
---|---|
date | Tue, 22 Aug 2023 21:05:52 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
420:af48cbdc0be0 | 423:8f797bb7ccb3 |
---|---|
1 # | |
2 # Copyright (c) 2023. Ohio Department of Education. - All Rights Reserved. | |
3 # Unauthorized copying of this file, in any medium, is strictly prohibited. | |
4 # Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/) | |
5 # | |
6 # | |
7 | |
8 #!/bin/bash | |
9 | |
10 #!/bin/bash | |
11 # | |
12 BASEDIR="$PWD" | |
13 # read required environment variables | |
14 source $BASEDIR/.env/ssdt-inventory-shared.properties | |
15 source $BASEDIR/.env/ssdt-inventory-import.properties | |
16 # | |
17 # docker login | |
18 echo "Attempting to login to $artifactUrl" | |
19 docker login $artifactUrl -u $artifactUser -p $artifactPassword | |
20 # docker pull | |
21 echo "Attempting to pull inventory-anon:1.0.0" | |
22 docker pull $artifactUrl/inventory-anon:1.0.0 | |
23 # | |
24 dockerParams="--rm --name $entityId-inventory-anonapp --network $entityId-inventory-net" | |
25 dockerParams="$dockerParams -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-inventory-db:5432/invdb -e SPRING_DATASOURCE_PASSWORD=postgres" | |
26 dockerParams="$dockerParams -e SPRING_PROFILES_ACTIVE=prod -i inventory-anon:1.0.0" | |
27 echo "Executing docker run command" | |
28 docker run $dockerParams |