Mercurial > public > ssdt-docker
annotate prod/install-ess-db.sh @ 530:7067a9e7e993 release/2.17.0
flow: Created branch 'release/2.17.0'.
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Thu, 02 May 2024 22:45:37 -0400 |
parents | cb688221b17b |
children |
rev | line source |
---|---|
519 | 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 | |
526
cb688221b17b
Add ESS scripts and update workflows to connect to employee self service.
Marc Davis <marc.davis@mcoecn.org>
parents:
519
diff
changeset
|
9 echo "attempting to login to $artifactUrl" |
cb688221b17b
Add ESS scripts and update workflows to connect to employee self service.
Marc Davis <marc.davis@mcoecn.org>
parents:
519
diff
changeset
|
10 docker login $artifactUrl -u $artifactUser -p $artifactPassword |
519 | 11 # docker pull db image |
526
cb688221b17b
Add ESS scripts and update workflows to connect to employee self service.
Marc Davis <marc.davis@mcoecn.org>
parents:
519
diff
changeset
|
12 echo "attempting to pull $artifactUrl/ess-db:$dbVersion" |
cb688221b17b
Add ESS scripts and update workflows to connect to employee self service.
Marc Davis <marc.davis@mcoecn.org>
parents:
519
diff
changeset
|
13 docker pull $artifactUrl/ess-db:$dbVersion |
519 | 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 \ | |
526
cb688221b17b
Add ESS scripts and update workflows to connect to employee self service.
Marc Davis <marc.davis@mcoecn.org>
parents:
519
diff
changeset
|
26 -d $artifactUrl/ess-db:$dbVersion |