#!/bin/bash

HOST=update.artix.su # update.artix.su/udpate.artix.su

apt-get install wget -y
if [[ ${HOST} == update.artix.su ]]; then
  wget https://update.artix.su/static/cs/install_scripts/testing/main/import_docker_cert.sh
else
  wget https://update.artix.su/static/cs/install_scripts/stable/main/import_docker_cert.sh
fi

sudo chmod +x import_docker_cert.sh
./import_docker_cert.sh
# установка переменных окружения
set -a
. config.env
set +a

cat << EOF > env.conf
set \$cardsmobile_host ${CARDSMOBILE_HOST};
set \$cardsmobile_port ${CARDSMOBILE_PORT};
EOF

# разворачивание контейнеров
docker compose up -d
