Skip to content
Snippets Groups Projects
run.sh 360 B
Newer Older
insert's avatar
insert committed
#!/bin/bash
insert's avatar
insert committed
# Split at \n instead of space.
# https://unix.stackexchange.com/a/39482
set -f
IFS='
'

input=($(egrep -v '^#' .env))
prepended=(${input[@]/#/-e\"})
variables=${prepended[@]/%/\"}

unset IFS
set +f

insert's avatar
insert committed
echo "Running Revolt in detached mode."
docker run \
    -d \
    --name revolt \
    -p 8000:8000 \
    -p 9000:9000 \
insert's avatar
insert committed
    $variables \
insert's avatar
insert committed
    revolt