From 79f8d7772b517f5a82de6c114a5b91d7a0f751f7 Mon Sep 17 00:00:00 2001 From: Jaroslav Beran Date: Fri, 26 Jan 2024 19:58:33 +0100 Subject: [PATCH 1/2] Database host fix --- docker-compose/create-schema.sh | 5 +++-- docker-compose/svjis-dev.yml | 4 ++-- docker-compose/svjis-prod.yml | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-compose/create-schema.sh b/docker-compose/create-schema.sh index 5bc36dd..d0dac4f 100644 --- a/docker-compose/create-schema.sh +++ b/docker-compose/create-schema.sh @@ -1,9 +1,10 @@ USER=sysdba PASSWORD=change-it +HOST=svjis-db DATABASE=SVJIS_PRODUCTION -/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/database.sql' "localhost:$DATABASE" +/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/database.sql' "$HOST:$DATABASE" rm /firebird/database.sql echo "EXECUTE PROCEDURE SP_CREATE_COMPANY 'New Company'; COMMIT;" > /firebird/comp.sql -/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/comp.sql' "localhost:$DATABASE" +/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/comp.sql' "$HOST:$DATABASE" rm /firebird/comp.sql diff --git a/docker-compose/svjis-dev.yml b/docker-compose/svjis-dev.yml index 9995a24..93f0167 100644 --- a/docker-compose/svjis-dev.yml +++ b/docker-compose/svjis-dev.yml @@ -4,7 +4,7 @@ services: svjis-app: image: berk76/svjis-app:latest - container_name: svjis_app + container_name: svjis-app restart: unless-stopped ports: - 8080:8080 @@ -16,7 +16,7 @@ services: svjis-db: image: jacobalberty/firebird:v3.0.10 - container_name: svjis_db + container_name: svjis-db restart: unless-stopped ports: - 3050:3050 diff --git a/docker-compose/svjis-prod.yml b/docker-compose/svjis-prod.yml index aca0317..ca520fe 100644 --- a/docker-compose/svjis-prod.yml +++ b/docker-compose/svjis-prod.yml @@ -18,7 +18,7 @@ services: svjis-app: image: berk76/svjis-app:latest - container_name: svjis_app-prod + container_name: svjis-app restart: unless-stopped ports: - 8080:8080 @@ -30,7 +30,7 @@ services: svjis-db: image: jacobalberty/firebird:v3.0.10 - container_name: svjis_db-prod + container_name: svjis-db restart: unless-stopped ports: - 3050:3050 From 23640fcbb7fd8230b0b78e0954fcaf77a8d04c5b Mon Sep 17 00:00:00 2001 From: Jaroslav Beran Date: Fri, 26 Jan 2024 20:02:17 +0100 Subject: [PATCH 2/2] Database host fix --- docker-compose/create-schema.sh | 2 +- docker-compose/svjis-dev.yml | 4 ++-- docker-compose/svjis-prod.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose/create-schema.sh b/docker-compose/create-schema.sh index d0dac4f..8def6b4 100644 --- a/docker-compose/create-schema.sh +++ b/docker-compose/create-schema.sh @@ -1,6 +1,6 @@ USER=sysdba PASSWORD=change-it -HOST=svjis-db +HOST=svjis_db DATABASE=SVJIS_PRODUCTION /usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/database.sql' "$HOST:$DATABASE" diff --git a/docker-compose/svjis-dev.yml b/docker-compose/svjis-dev.yml index 93f0167..9995a24 100644 --- a/docker-compose/svjis-dev.yml +++ b/docker-compose/svjis-dev.yml @@ -4,7 +4,7 @@ services: svjis-app: image: berk76/svjis-app:latest - container_name: svjis-app + container_name: svjis_app restart: unless-stopped ports: - 8080:8080 @@ -16,7 +16,7 @@ services: svjis-db: image: jacobalberty/firebird:v3.0.10 - container_name: svjis-db + container_name: svjis_db restart: unless-stopped ports: - 3050:3050 diff --git a/docker-compose/svjis-prod.yml b/docker-compose/svjis-prod.yml index ca520fe..9b7aad6 100644 --- a/docker-compose/svjis-prod.yml +++ b/docker-compose/svjis-prod.yml @@ -18,7 +18,7 @@ services: svjis-app: image: berk76/svjis-app:latest - container_name: svjis-app + container_name: svjis_app restart: unless-stopped ports: - 8080:8080 @@ -30,7 +30,7 @@ services: svjis-db: image: jacobalberty/firebird:v3.0.10 - container_name: svjis-db + container_name: svjis_db restart: unless-stopped ports: - 3050:3050