feat: deploy forms in dev env script

This commit is contained in:
Aravinth Manivannan 2022-12-29 03:39:26 +05:30
parent b2eeb5b9fd
commit fe76a648a4
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 32 additions and 0 deletions

32
scripts/forms.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
readonly NAME=librepages-forms
readonly DB_NAME=librepages-forms-postgres
docker rm -f $NAME
docker rm -f $DB_NAME
docker create --name $DB_NAME -p 5433:5432 \
-e POSTGRES_PASSWORD=password \
postgres
docker create --name $NAME -p 6000:6000 \
--network=host \
-e LPFORMS__SOURCE_CODE="https://git.batsense.net/LibrePages/forms" \
-e LPFORMS_SERVER__PROXY_HAS_TLS=false \
-e LPFORMS_DEBUG="false" \
-e LPFORMS_SERVER_URL_PREFIX="" \
-e LPFORMS_SERVER_DOMAIN="forms.librepages.test" \
-e LPFORMS_SERVER_IP="0.0.0.0" \
-e LPFORMS_SERVER_PROXY_HAS_TLS="false" \
-e LPFORMS_SOURCE_CODE="https://example.org" \
-e LPFORMS_DASH_API_KEY=$LPFORMS_DASH_API_KEY \
-e LPFORMS_DATABASE_POOL=2 \
-e PORT="6000"\
-e DATABASE_URL=postgres://postgres:password@localhost:5433/postgres \
realaravinth/librepages-forms forms serve
docker start $DB_NAME
sleep 5
docker start $NAME