1
0
Fork 0

Compare commits

..

3 Commits

Author SHA1 Message Date
Ilya Mukhortov 1704e1b4d2 pass 2025-01-30 10:18:46 +10:00
Ilya Mukhortov 0ffb8c34c6 pass 2025-01-30 10:18:03 +10:00
Ilya Mukhortov b9b286717e pass 2025-01-30 10:10:54 +10:00
4 changed files with 12 additions and 2 deletions

View File

@ -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
read -p "Enter organization name: " ORGANIZATION_NAME
read -p "Enter organization id: " ORGANIZATION_ID
SECRET_KEY=$(openssl rand -base64 32)
@ -18,6 +19,8 @@ SECRET_KEY=$SECRET_KEY
SENTRY_SITE=$ORGANIZATION_NAME
ORGANIZATION_ID=$ORGANIZATION_ID
EOT
cd /root/medicine-config/medicine

View File

@ -7,8 +7,7 @@ docker pull docker.med-logic.ru/medicine-remd:latest
read -r -p "Create database? [y/N] " response
if [[ $prompt =~ [yY](es)* ]]
then
cd /root/medicine-config/medicine-stack
docker-compose exec postgres psql -c 'CREATE DATABASE medicine_remd' --username=postgres
docker exec medicine-stack-postgres psql -c 'CREATE DATABASE medicine_remd' --username=postgres
fi
read -p "Enter organization name: " ORGANIZATION_NAME

View File

@ -19,3 +19,4 @@ if test -f "${archive_filename}"; then
fi
tar -czf "${archive_filename}" "${backup_filename}"
rm "${backup_filename}"

7
medicine/pull-and-migrate.sh Executable file
View File

@ -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