annotate prod/setup.sh @ 523:9284ecfe940b production v2.16.1

flow: Merged <hotfix> '2.16.1' to <master> ('production').
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 30 Jan 2024 10:55:04 -0500
parents 748b0e2204dc
children
rev   line source
129
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
1 #!/bin/bash
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
2 # Sets up a new district project based on SSDT default configuration in the current working directory.
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
3 #
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
4 # Usage:
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
5 #
135
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
6 # /data/preview/sampletown $ /ssdt/compose2/preview/setup.sh [usas,usps...]
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
7 #
129
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
8 # Will create a docker-compose.yml and .env file with default settings.
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
9 #
337
748b0e2204dc putting old setup.sh back
aldrich@ssdt-ohio.org
parents: 333
diff changeset
10 # Put back in default on 5/4/2020
145
75aa7005b544 DEP-12: move comopse files to 'pilot' location
smith@nwoca.org
parents: 136
diff changeset
11 source "$(dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
129
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
12
136
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
13 md5calc() {
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
14 md5sum ${1} ;
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
15 }
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
16
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
17 md5verify() {
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
18 md5sum -c --status ${1} ;
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
19 }
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
20
149
ab4effbe8d43 DEP-12: generate unique DB passwords for application databases
smith@nwoca.org
parents: 148
diff changeset
21 genDBHash() {
ab4effbe8d43 DEP-12: generate unique DB passwords for application databases
smith@nwoca.org
parents: 148
diff changeset
22 echo $(date +%s%N | sha256sum | base64 | head -c 32 ; echo)
ab4effbe8d43 DEP-12: generate unique DB passwords for application databases
smith@nwoca.org
parents: 148
diff changeset
23 }
ab4effbe8d43 DEP-12: generate unique DB passwords for application databases
smith@nwoca.org
parents: 148
diff changeset
24
129
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
25 base=$(dirname "${BASH_SOURCE[0]}")
132
a095257a342b DEP-12: add auto-config of initial integration keys
smith@nwoca.org
parents: 130
diff changeset
26 default_name=$(basename $PWD)
129
5c986cbb22b8 DEP-12: add simple script to standardize setting up projects
smith@nwoca.org
parents:
diff changeset
27
135
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
28 args="$1$2"
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
29
136
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
30 usas=""
72f15ffc9ad2 DEP-12: convert compose files to 3.1. remove template. update bash script to create composite docker-files without extends. prevent overwriting manual changes to docker-comose.yml
smith@nwoca.org
parents: 135
diff changeset
31 usps=""
135
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
32
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
33 if [ "$args" == "" ] || [ -z "${args##*usas*}" ]
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
34 then
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
35 usas=1
03e39b95d904 DEP-12: convert to compose verison 3.1 (again)
smith@nwoca.org
parents: 134
diff changeset
36 fi