openreplay/scripts/docker-compose/run.sh
Rajesh Rajendran e0186a73c6 Docker (#1668)
* docker-compose: Adding docker-compose installation

* docker-compose: init scripts

* fix: shell expansion

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2023-11-20 16:15:06 +01:00

9 lines
522 B
Bash

# Load variables from common.env into the current shell's environment
set -a # automatically export all variables
source common.env
set +a
# Use the `envsubst` command to substitute the shell environment variables into reference_var.env and output to a combined .env
find ./ -type f \( -iname "*.env" -o -iname "docker-compose.yaml" \) ! -name "common.env" -exec /bin/bash -c 'file="{}"; git checkout -- "$file"; cp "$file" "$file.bak"; envsubst < "$file.bak" > "$file"; rm "$file.bak"' \;
sudo -E docker-compose up -d