dayzdockerserver/web/bin/start.sh
Daniel Ceregatti 8a87edf798 Refactor docker compose build so a single server image is built for however many servers.
Add horse mod, despite it being known to crash the Linux server. One day...
Fix bashrc getting appended to instead of written to. Oops!
2024-07-26 21:44:21 -07:00

27 lines
447 B
Bash
Executable file

#!/usr/bin/env bash
# Set PS1 so we know we're in the container
if ! echo .bashrc | grep -q "dz-web"
then
echo "Adding PS1 to .bashrc..."
cat > .bashrc <<EOF
alias ls='ls --color'
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-web:\w\$ "
unset DEVELOPMENT
EOF
fi
# Shut steamcmd up
if ! [ -d ${HOME}/.steam ]
then
mkdir -p ${HOME}/.steam
fi
cd /web
npm i
export DEBUG='express:*'
npx nodemon web.js &
cd docroot
npm i
exec npm run dev