dayzdockerserver/web/bin/start.sh
Daniel Ceregatti 85e59ae8c6 First working version with vite-express integration.
Refactor the main page to show the Steam login when none is detected. We can't do anything without it at first. Later, we can detect if the server is installed and allow operations. Or not.
Remove server container. This will be created and maintained by the web container going forward.
Use node 18, as vite requires it.
Use a single package.json for everything. This way it can be installed at the root of the container and not show up in the bind mount.
Refactor store to include actions. We can just define them and call them, instead of using fetch directly everywhere. WIP.
Begin to implement some of the backend methods, like the steam login. It works!

Remove the old code.
2024-07-28 10:35:43 -07:00

30 lines
495 B
Bash
Executable file

#!/usr/bin/env bash
set -eE
trap '
echo "Shutting down..."
' SIGINT SIGTERM
# Set PS1 so we know we're in the container
if grep -q "dz-web" .bashrc
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
export PATH=${PATH}:/usr/local/dotnet
EOF
fi
# Shut steamcmd up
if ! [ -d ${HOME}/.steam ]
then
mkdir -p ${HOME}/.steam
fi
cd /web
#export DEBUG=express:*
npm run dev &
wait $!