diff --git a/backups/medicine.sql.zip b/backups/medicine.sql.zip new file mode 100644 index 0000000..0b2da4e Binary files /dev/null and b/backups/medicine.sql.zip differ diff --git a/bash_scripts/install-medicine.sh b/bash_scripts/install-medicine.sh new file mode 100644 index 0000000..941999d --- /dev/null +++ b/bash_scripts/install-medicine.sh @@ -0,0 +1,16 @@ +set -e + +echo "readonly" | docker login docker.med-logic.ru --username readonly --password-stdin + +docker pull docker.med-logic.ru/medicine-nginx:latest +docker pull docker.med-logic.ru/medicine-app:latest + +unzip ../backups/medicine.sql.zip ../volumes/files/ + +docker exec -i medicine-stack-postgres psql -U postgres -d medicine -f /files/medicine.sql + +cd /root/medicine-config/medicine +if [ ! -f .env ] +then + cp env.sample .env +fi diff --git a/bash_scripts/install-remd.sh b/bash_scripts/install-remd.sh index ea90cbf..cb13d20 100644 --- a/bash_scripts/install-remd.sh +++ b/bash_scripts/install-remd.sh @@ -9,3 +9,4 @@ docker-compose exec postgres psql -c 'CREATE DATABASE medicine_remd' --username= cd /root/medicine-config/medicine-remd docker-compose run --rm medicine-remd python manage.py post_install +docker-compose up -d \ No newline at end of file