From b50b11a76467630019d3d9fefdb79963d81ae2cc Mon Sep 17 00:00:00 2001 From: Jarda Beran Date: Sat, 27 Jan 2024 12:39:13 +0100 Subject: [PATCH] Database Host Fix (#20) * Database host fix * Database host fix --- docker-compose/create-schema.sh | 5 +++-- docker-compose/svjis-prod.yml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose/create-schema.sh b/docker-compose/create-schema.sh index 5bc36dd..8def6b4 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-prod.yml b/docker-compose/svjis-prod.yml index aca0317..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-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