Skip to content
Snippets Groups Projects
Commit a65a2431 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

#6 add infohub to docker-compose environment

parent 7f0b2fc3
No related branches found
No related tags found
1 merge request!4#6 add infohub to docker-compose environment
......@@ -31,12 +31,6 @@ with environment variables which will be injected in its container.
./setup.sh
```
* set the services you would like to use in the docker-compose.yml file, defaults is **infohub**
* set needed environment variables in an `.env` file and add the file path in `export-env.sh` script
* export environment variables:
```
. ./export-env.sh
```
* run docker compose:
```
......
version: '3.4'
services:
infohub:
container_name: infohub
build:
context: $GOPATH/src/code.vereign.com/gaiax/tsa/infohub
dockerfile: deployment/compose/Dockerfile
volumes:
- "$GOPATH/src/code.vereign.com/gaiax/tsa/infohub:/go/src/code.vereign.com/gaiax/tsa/infohub"
env_file:
./env/infohub.env
ports:
- "8080:8080"
redis:
image: "redis:alpine"
container_name: redis
......@@ -19,11 +31,8 @@ services:
driver-did-sov:
image: universalresolver/driver-did-sov:latest
environment:
uniresolver_driver_did_sov_libIndyPath: ${uniresolver_driver_did_sov_libIndyPath}
uniresolver_driver_did_sov_poolConfigs: ${uniresolver_driver_did_sov_poolConfigs}
uniresolver_driver_did_sov_poolVersions: ${uniresolver_driver_did_sov_poolVersions}
uniresolver_driver_did_sov_walletName: ${uniresolver_driver_did_sov_walletName}
env_file:
./env/resolver.env
ports:
- "9092:8080"
......
HTTP_HOST=""
HTTP_PORT="8080"
HTTP_IDLE_TIMEOUT="60s"
HTTP_READ_TIMEOUT="10s"
HTTP_WRITE_TIMEOUT="10s"
HTTP_MAX_REQUEST_SIZE="1000000"
REDIS_HOST="redis"
\ No newline at end of file
#!/bin/sh
## Usage:
## . ./export-env.sh
envFiles=(
"env/resolver.env"
)
unamestr=$(uname)
for f in ${envFiles[@]}; do
echo "Exporting $f ..."
if [ "$unamestr" = 'Linux' ]; then
export $(grep -v '^#' $f | xargs -d '\n')
elif [ "$unamestr" = 'FreeBSD' ] || [ "$unamestr" = 'Darwin' ]; then
export $(grep -v '^#' $f | xargs -0)
fi
done
echo "Done"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment