Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
Docker compose - db host fix
Browse files Browse the repository at this point in the history
  • Loading branch information
berk76 committed Feb 1, 2024
1 parent b50b11a commit d5ef94d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker-compose/create-schema.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
USER=sysdba
PASSWORD=change-it
HOST=svjis_db
DATABASE=SVJIS_PRODUCTION

/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/database.sql' "$HOST:$DATABASE"
sleep 1s
cat /etc/hosts
/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/database.sql' "host.docker.internal:$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' "$HOST:$DATABASE"
/usr/local/firebird/bin/isql -user "$USER" -password "$PASSWORD" -input '/firebird/comp.sql' "host.docker.internal:$DATABASE"
rm /firebird/comp.sql
2 changes: 2 additions & 0 deletions docker-compose/svjis-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ services:
- TZ=Europe/Prague
volumes:
- ./svjis-data/firebird:/firebird
extra_hosts:
- "host.docker.internal:host-gateway"

firebirdadmin:
image: marianaldenhoevel/firebirdwebadmin:latest
Expand Down
2 changes: 2 additions & 0 deletions docker-compose/svjis-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ services:
- TZ=Europe/Prague
volumes:
- ./svjis-data/firebird:/firebird
extra_hosts:
- "host.docker.internal:host-gateway"

0 comments on commit d5ef94d

Please sign in to comment.