feat: run conductor instance while testing

This commit is contained in:
Aravinth Manivannan 2022-12-15 01:00:18 +05:30
parent be3af0e1fa
commit 8a2ada891e
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 24 additions and 0 deletions

View file

@ -24,6 +24,7 @@ coverage: ## Generate HTML code coverage
dev-env: ## Download development dependencies
npm install
cargo fetch
./scripts/conductor.sh
doc: ## Prepare documentation
cargo doc --no-deps --workspace --all-features

23
scripts/conductor.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash
readonly NAME=librepages-conductor
docker rm -f $NAME
docker create --name $NAME -p 5000:5000 \
-e LPCONDUCTOR__SOURCE_CODE="https://git.batsense.net/LibrePages/conductor" \
-e LPCONDUCTOR_SERVER__PROXY_HAS_TLS=false \
-e LPCONDUCTOR_DEBUG="false" \
-e LPCONDUCTOR_CONDUCTOR="dummy" \
-e LPCONDUCTOR_SERVER_URL_PREFIX="" \
-e LPCONDUCTOR_SERVER_DOMAIN="librepages.test" \
-e LPCONDUCTOR_SERVER_IP="0.0.0.0" \
-e LPCONDUCTOR_SERVER_PROXY_HAS_TLS="false" \
-e LPCONDUCTOR_SERVER_PORT=7000 \
-e LPCONDUCTOR_SOURCE_CODE="https://example.org" \
-e LPCONDUCTOR_CREDS_USERNAME=$LPCONDUCTOR_CREDS_USERNAME \
-e LPCONDUCTOR_CREDS_PASSWORD=$LPCONDUCTOR_CREDS_PASSWORD \
-e PORT="5000"\
realaravinth/librepages-conductor conductor serve
docker start $NAME