librepages/scripts/forms.sh

32 lines
903 B
Bash
Executable file

#!/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