Compare commits
3 Commits
17ffc8249c
...
1704e1b4d2
| Author | SHA1 | Date |
|---|---|---|
|
|
1704e1b4d2 | |
|
|
0ffb8c34c6 | |
|
|
b9b286717e |
|
|
@ -9,6 +9,7 @@ unzip /root/medicine-config/backups/medicine.sql.zip -d /root/medicine-config/vo
|
||||||
docker exec -i medicine-stack-postgres psql -U postgres -d medicine -f /files/medicine.sql
|
docker exec -i medicine-stack-postgres psql -U postgres -d medicine -f /files/medicine.sql
|
||||||
|
|
||||||
read -p "Enter organization name: " ORGANIZATION_NAME
|
read -p "Enter organization name: " ORGANIZATION_NAME
|
||||||
|
read -p "Enter organization id: " ORGANIZATION_ID
|
||||||
|
|
||||||
SECRET_KEY=$(openssl rand -base64 32)
|
SECRET_KEY=$(openssl rand -base64 32)
|
||||||
|
|
||||||
|
|
@ -18,6 +19,8 @@ SECRET_KEY=$SECRET_KEY
|
||||||
|
|
||||||
SENTRY_SITE=$ORGANIZATION_NAME
|
SENTRY_SITE=$ORGANIZATION_NAME
|
||||||
|
|
||||||
|
ORGANIZATION_ID=$ORGANIZATION_ID
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
cd /root/medicine-config/medicine
|
cd /root/medicine-config/medicine
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@ docker pull docker.med-logic.ru/medicine-remd:latest
|
||||||
read -r -p "Create database? [y/N] " response
|
read -r -p "Create database? [y/N] " response
|
||||||
if [[ $prompt =~ [yY](es)* ]]
|
if [[ $prompt =~ [yY](es)* ]]
|
||||||
then
|
then
|
||||||
cd /root/medicine-config/medicine-stack
|
docker exec medicine-stack-postgres psql -c 'CREATE DATABASE medicine_remd' --username=postgres
|
||||||
docker-compose exec postgres psql -c 'CREATE DATABASE medicine_remd' --username=postgres
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Enter organization name: " ORGANIZATION_NAME
|
read -p "Enter organization name: " ORGANIZATION_NAME
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,4 @@ if test -f "${archive_filename}"; then
|
||||||
fi
|
fi
|
||||||
tar -czf "${archive_filename}" "${backup_filename}"
|
tar -czf "${archive_filename}" "${backup_filename}"
|
||||||
rm "${backup_filename}"
|
rm "${backup_filename}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "readonly" | docker login docker.med-logic.ru --username readonly --password-stdin
|
||||||
|
docker pull docker.med-logic.ru/medicine:latest
|
||||||
|
docker run --rm --env-file .env --network medicine-network --name medicine-apply-migrations docker.med-logic.ru/medicine:latest python manage.py migrate --noinput
|
||||||
Loading…
Reference in New Issue