#!/bin/bash
echo '---------------------------------------------'
echo 'Descargando Imagenes'
echo '---------------------------------------------'
sudo mkdir /home/fe/data
sudo mkdir /home/fe/activeMQ
sudo mkdir /home/fe/activeMQ/conf
sudo mkdir /home/fe/activeMQ/data
sudo mkdir /home/fe/mule
sudo mkdir /home/fe/mule/logs
sudo mkdir /home/fe/atina
sudo mkdir /home/fe/atina/logs
sudo docker compose -f docker-compose.yml up --no-start
echo '---------------------------------------------'
echo 'Copiando Config'
echo '---------------------------------------------'
docker cp config/config fe-atina-microserver:/home/vsftpd
docker cp config/certificados fe-atina-microserver:/home/vsftpd
docker cp config/email fe-atina-microserver:/home/vsftpd
docker cp config/fe fe-atina-microserver:/home/vsftpd
docker cp config/images fe-atina-microserver:/home/vsftpd
docker cp config/pdfTemplates fe-atina-microserver:/home/vsftpd
docker cp config/database fe-atina-microserver:/home/vsftpd
docker cp config/html fe-atina-microserver:/home/vsftpd
docker cp config/schemas_normalizado fe-atina-microserver:/home/vsftpd
docker cp config/backend fe-atina-microserver:/home/vsftpd
echo '---------------------------------------------'
echo 'Iniciando Docker'
echo '---------------------------------------------'
sudo docker compose -f docker-compose.yml start
echo '---------------------------------------------'
echo 'HTML Server'
echo '---------------------------------------------'
echo 'Una vez iniciado el HTML Server ejecutar:'
echo '   bash update-html_server.sh'