1
0
Fork 0

+ medicine damask

This commit is contained in:
Ilya Mukhortov 2024-07-02 20:26:56 +10:00
parent 293abfd570
commit 1f64a94b32
4 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,21 @@
version: '3'
services:
medicine-damask:
restart: "always"
image: docker.med-logic.ru/medicine-damask:latest
container_name: medicine-damask
env_file: .env
ports:
- "877:80"
networks:
- medicine-network
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
networks:
medicine-network:
external: true

16
medicine-damask/install.sh Executable file
View File

@ -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-damask:latest
cd /root/medicine-config/medicine-stack
docker-compose exec postgres psql -c 'CREATE DATABASE medicine_damask' --username=postgres
cat <<EOT >> /root/medicine-config/medicine-damask/.env
EOT
cd /root/medicine-config/medicine-damask
docker-compose run --rm medicine-damask python manage.py migrate
docker-compose run --rm medicine-damask python manage.py post_install
docker-compose up -d

2
medicine-damask/restart.sh Executable file
View File

@ -0,0 +1,2 @@
docker-compose stop
docker-compose up -d

7
medicine-damask/update.sh Executable file
View File

@ -0,0 +1,7 @@
set -e
docker pull docker.med-logic.ru/medicine-damask:latest
docker-compose stop
docker-compose up -d
docker rmi $(docker images -f "dangling=true" -q)