build(docker): allow backend container to connect to database container

This commit is contained in:
Sarah Vaupel 2024-09-22 02:37:38 +02:00
parent 052c361f1d
commit 20552032de
2 changed files with 2 additions and 2 deletions

View File

@ -214,7 +214,7 @@ database-%:
.PHONY: --containerized-database
--containerized-database: FRADRIVE_SERVICE=database
# port forwarding is disabled in --network=host mode; nevertheless it is stated here for documentation reasons
--containerized-database: CONTAINER_PORTS=-p 127.0.0.1:5432:5432/tcp
--containerized-database: CONTAINER_PORTS=-p 5432:5432/tcp
--containerized-database: --image-build
if [ "$(IN_CONTAINER)" == "false" ] ; then \
$(CONTAINER_COMMAND) run -it $(CONTAINER_PORTS) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \

View File

@ -123,7 +123,7 @@ auth-pw-hash:
database:
user: "_env:PGUSER:uniworx"
password: "_env:PGPASS:uniworx"
host: "_env:PGHOST:127.0.0.1"
host: "_env:PGHOST:host.docker.internal"
port: "_env:PGPORT:5432"
# See config/test-settings.yml for an override during tests
database: "_env:PGDATABASE:uniworx"