feat: lamassu initial dockerize approach
feat: improve dockerization feat: finished initial versions of dockerfiles fix: small fixes to image building
This commit is contained in:
parent
b0860cdea5
commit
bd82285ecf
14 changed files with 484 additions and 20 deletions
27
bin/lamassu-server-entrypoint.sh
Normal file
27
bin/lamassu-server-entrypoint.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
FILE_1=/etc/ssl/certs/Lamassu_CA.pem
|
||||
FILE_2=/etc/ssl/certs/Lamassu_OP.pem
|
||||
FILE_3=/etc/ssl/certs/Lamassu_OP_Root_CA.pem
|
||||
FILE_4=/etc/ssl/certs/Lamassu_OP_Root_CA.srl
|
||||
FILE_5=/etc/ssl/private/Lamassu_OP.key
|
||||
FILE_6=/etc/ssl/private/Lamassu_OP_Root_CA.key
|
||||
|
||||
echo "Executing migrations..."
|
||||
node /app/packages/lamassu-server/bin/lamassu-migrate
|
||||
|
||||
echo "Checking for the existence of certificates..."
|
||||
if [[ ! -f "$FILE_1" || ! -f "$FILE_2" || ! -f "$FILE_3" || ! -f "$FILE_4" || ! -f "$FILE_5" || ! -f "$FILE_6" ]]; then
|
||||
echo "No Lamassu certificates found. Building them..."
|
||||
bash /app/packages/lamassu-server/tools/build-docker-certs.sh
|
||||
fi
|
||||
|
||||
USER_COUNT=$(node /app/packages/lamassu-server/tools/check-user-count.js)
|
||||
|
||||
if [[ $USER_COUNT == '0' ]]; then
|
||||
echo "No initial user found. Creating master@lamassu.is..."
|
||||
node /app/packages/lamassu-server/bin/lamassu-register master@lamassu.is superuser
|
||||
fi
|
||||
|
||||
echo "Starting server..."
|
||||
node /app/packages/lamassu-server/bin/lamassu-server
|
||||
Loading…
Add table
Add a link
Reference in a new issue