- All binaries are stored in
~/bin
directory (directory is automatically created during build step) - All environment files are stored in
~/bin
directory - All logs are stores in
~/log
directory (directory must be manually created)
All prerequisities are supposed to be done only once when setting up the VM.
sudo apt install gcc
cd ~
mkdir go
wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz
Set path to go binary
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
Ubuntu
sudo apt install supervisor
MacOS
brew install supervisor
mkdir ~/log
- Fetch git tag representing the version of the service you are going to deploy.
git fetch --all --tags --prune
git checkout tags/<tag_name>
- Build binary of the service to be deployed (e.g. call
task local:dal-build
to createdal
in~/bin/
) - Create symlink from
supervisor/*.conf
file to/etc/supervisor/conf.d/*.conf
(MacOS uses/opt/homebrew/etc/supervisor.d/*.conf
) - Create symlink to (or copy)
.env.*
file (.env
file is in format.env.service_name
) to~/bin
- Launch service through supervisor
supervisorctl
reread
update
- Fetch git tag representing the version of the service you are going to deploy.
git fetch --all --tags --prune
git checkout tags/<tag_name>
- Build binary of the service to be deployed (e.g. call
task local:dal-build
to createdal
in~/bin/
) - Update
*.conf
if necessary - Update
.env.*
if necessary - Launch service through supervisor
supervisorctl
reread
update