From 3a4138dcc3ac9e6fa368b2baea15185b527fe0e1 Mon Sep 17 00:00:00 2001 From: Ilya Mukhortov Date: Tue, 9 Jan 2024 14:15:05 +1000 Subject: [PATCH] add medicine import --- medicine-import/docker-compose.yml | 21 +++++++++++++++++++++ medicine-import/install.sh | 12 ++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 medicine-import/docker-compose.yml create mode 100644 medicine-import/install.sh diff --git a/medicine-import/docker-compose.yml b/medicine-import/docker-compose.yml new file mode 100644 index 0000000..4024583 --- /dev/null +++ b/medicine-import/docker-compose.yml @@ -0,0 +1,21 @@ + +version: '3.4' + +services: + + medicine-import: + restart: "always" + container_name: "medicine-import" + image: docker.med-logic.ru/medicine-import:latest + environment: + POSTGRES_HOST: postgres-host + POSTGRES_USER: postgres + POSTGRES_PASSWORD: password + POSTGRES_DB: medicine_import + + REDIS_HOST: redis-host + REDIS_DB: 12 + volumes: + - ./public:/app/public + ports: + - "9350:80" diff --git a/medicine-import/install.sh b/medicine-import/install.sh new file mode 100644 index 0000000..5f60fd0 --- /dev/null +++ b/medicine-import/install.sh @@ -0,0 +1,12 @@ +set -e + +echo "readonly" | docker login docker.med-logic.ru --username readonly --password-stdin + +docker pull docker.med-logic.ru/medicine-import:latest + +cd /root/medicine-config/medicine-stack +docker-compose exec postgres psql -c 'CREATE DATABASE medicine_import' --username=postgres + +cd /root/medicine-config/medicine-import +docker-compose run --rm medicine-import python manage.py post_install +docker-compose up -d