view prod/anon-inventory.sh @ 539:5d5525414c8d production tip

update exec-all-projects-docker.sh to search for ./env/*-shared.properties in place of ./env/ssdt-*-shared.properties. ESS doesn't follow the same pattern for property file names.
author Marc Davis <marc.davis@mcoecn.org>
date Mon, 13 May 2024 13:28:30 -0400
parents 8f797bb7ccb3
children
line wrap: on
line source
#
# 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