🇺🇾 Averigüemos quién es el más tonto.
🇬🇧 Let's find out who is the dumbest.
...but this time in Scala using Scala CLI.
Our server uses PM2 for managing running processes.
PM2 allows configuring processes with configuration files.
The app includes a template file for starting its process.
-
SSH into the server.
-
CD into the cloned repo:
cd elmas-v2
-
Copy the template file:
cp template.process.yaml proccess.yaml
-
Configure env vars by editing
proccess.yaml
-
Setup the process for running the app:
pm2 start process.yaml
- Package with:
scala-cli package . -o ./bin/Main -f
- Commit the binary.
-
SSH into the server.
-
CD into the repo:
cd elmas-v2
-
Git pull
-
Reload with
pm2 reload process.yaml