Mercurial > public > ssdt-docker
annotate prod/anon-inventory.sh @ 538:e849a863687a production
Merge default to production for execute permission changes
author | Matt Calmes <calmes@ssdt-ohio.org> |
---|---|
date | Mon, 06 May 2024 11:01:06 -0400 |
parents | 8f797bb7ccb3 |
children |
rev | line source |
---|---|
423
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
1 # |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
2 # Copyright (c) 2023. Ohio Department of Education. - All Rights Reserved. |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
3 # Unauthorized copying of this file, in any medium, is strictly prohibited. |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
4 # Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/) |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
5 # |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
6 # |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
7 |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
8 #!/bin/bash |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
9 |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
10 #!/bin/bash |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
11 # |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
12 BASEDIR="$PWD" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
13 # read required environment variables |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
14 source $BASEDIR/.env/ssdt-inventory-shared.properties |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
15 source $BASEDIR/.env/ssdt-inventory-import.properties |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
16 # |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
17 # docker login |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
18 echo "Attempting to login to $artifactUrl" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
19 docker login $artifactUrl -u $artifactUser -p $artifactPassword |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
20 # docker pull |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
21 echo "Attempting to pull inventory-anon:1.0.0" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
22 docker pull $artifactUrl/inventory-anon:1.0.0 |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
23 # |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
24 dockerParams="--rm --name $entityId-inventory-anonapp --network $entityId-inventory-net" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
25 dockerParams="$dockerParams -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-inventory-db:5432/invdb -e SPRING_DATASOURCE_PASSWORD=postgres" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
26 dockerParams="$dockerParams -e SPRING_PROFILES_ACTIVE=prod -i inventory-anon:1.0.0" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
27 echo "Executing docker run command" |
8f797bb7ccb3
INV-470: Added script to anonymize inventory db.
Jason Klinger <klinger@nwoca.org>
parents:
diff
changeset
|
28 docker run $dockerParams |