24 lines
1.0 KiB
Bash
24 lines
1.0 KiB
Bash
cd /srv
|
|
|
|
# install software
|
|
apt install nano wget curl docker.io -y
|
|
|
|
# install docker-compose. Apt installs broken version, so use this way.
|
|
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
chmod +x /usr/local/bin/docker-compose
|
|
|
|
# install keys
|
|
curl https://git.infra.timal.kz/djerom/public/raw/branch/master/install-keys.sh | bash
|
|
|
|
# copy base services (traefik, agent)
|
|
wget https://git.infra.timal.kz/djerom/public/raw/branch/master/srv/traefik.yml
|
|
wget https://git.infra.timal.kz/djerom/public/raw/branch/master/srv/agent.yml
|
|
wget https://git.infra.timal.kz/djerom/public/raw/branch/master/srv/mysql.yml
|
|
|
|
# copy base env file
|
|
curl https://git.infra.timal.kz/djerom/public/raw/branch/master/srv/.env.example | sed 's/\r$//' > .env
|
|
|
|
# install updater
|
|
curl https://git.infra.timal.kz/djerom/public/raw/branch/master/srv/update.sh | sed 's/\r$//' > update.sh
|
|
chmod +x /srv/update.sh
|
|
echo "*/3 * * * * /srv/update.sh" | crontab - |