Mercurial > public > ssdt-docker
comparison prod/install-ess-db.sh @ 533:2e67cfae1533 production v2.17.0
flow: Merged <release> '2.17.0' to <master> ('production').
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Thu, 02 May 2024 22:46:24 -0400 |
parents | cb688221b17b |
children |
comparison
equal
deleted
inserted
replaced
524:6ddfd364a52a | 533:2e67cfae1533 |
---|---|
1 #!/bin/bash | |
2 # | |
3 # read required env variables | |
4 BASEDIR="$PWD" | |
5 source $BASEDIR/.env/ess-shared.properties | |
6 source $BASEDIR/.env/ess-db.properties | |
7 # | |
8 # docker login | |
9 echo "attempting to login to $artifactUrl" | |
10 docker login $artifactUrl -u $artifactUser -p $artifactPassword | |
11 # docker pull db image | |
12 echo "attempting to pull $artifactUrl/ess-db:$dbVersion" | |
13 docker pull $artifactUrl/ess-db:$dbVersion | |
14 # | |
15 # create employee self service specific docker network for $entityId | |
16 echo "attempting to create $entityId-ess-net docker network" | |
17 docker network create $entityId-ess-net | |
18 # docker run ess-db (data mounted as volume) connected to $entityId-ess-net docker network | |
19 echo "attempting to execute docker run command" | |
20 docker run --name $entityId-ess-db \ | |
21 --restart=unless-stopped \ | |
22 --mount source=$entityId-ess-db,target=/var/lib/postgresql/data \ | |
23 --network $entityId-ess-net \ | |
24 -e POSTGRES_DB=essdb \ | |
25 -e POSTGRES_PASSWORD=$dbPassword \ | |
26 -d $artifactUrl/ess-db:$dbVersion |