cleanup directory strucutre and fine tune
This commit is contained in:
25
terraform/setupAppServer.sh
Normal file
25
terraform/setupAppServer.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt -y update
|
||||
apt -y upgrade
|
||||
apt -y update
|
||||
apt -y install podman
|
||||
|
||||
podman image load -i /tmp/dumbserver.image.tar
|
||||
|
||||
# create the directory for the data file and, if not existing (which is the default) copy the example file
|
||||
mkdir -p /var/local/dumbserver
|
||||
if [ ! -f /var/local/dumbserver/data ]; then
|
||||
cp /tmp/data /var/local/dumbserver/
|
||||
fi
|
||||
|
||||
podman run --name dumbserver -d -p 1280:1280 -v /var/local/dumbserver:/nodejsapp/dataDir dumbserver
|
||||
|
||||
# make sure it comes up after reboot...
|
||||
podman generate systemd --new --name dumbserver > /etc/systemd/system/dumbserver-podman.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable dumbserver-podman.service
|
||||
|
||||
# finally, all is set up and after all the updates we want to reboot into the new kernel version
|
||||
shutdown -r 1
|
||||
Reference in New Issue
Block a user