Prisma – Error validating datasource from docker container

So I am working on a project where I created a logger service that uses prisma to post some logs to a postgres database. The logger service is in a docker container and the postgres db is also in a contanier. Both are on a testing linux computer.

I can use DBeaver to connect to the databse and creating tables and everythign as normal.
When I spin up the logger service with node on my main computer, everything works as expected posting logs to the database in the container on the linux computer.

When I hit the logging service in a container on the linux computer, from my main computer. I get the following error:

error: Error validating datasource db: the URL must start with the protocol postgresql:// or postgres://.

For the docker file I am running the following:

FROM node:18-alpine
WORKDIR /usr/app
COPY ./ /usr/app

ARG EXPOSE_PORT=3000
ARG LOGGER_ENV="DEV"
ARG LOG_DATABASE_URL="postgresql://postgres:exmaple@localhost:5432/log"
ENV LOGGER_PORT=${EXPOSE_PORT}
ENV LOG_DATABASE_URL=${LOG_DATABASE_URL}
ENV DB_LOGGER_ENVIORMENT=${LOGGER_ENV}
RUN npm install
RUN npm uninstall prisma
RUN npm install prisma
RUN npx prisma generate
EXPOSE ${EXPOSE_PORT}
CMD ["npm", "start"]

I am using portainer and the template allows for the user of docker compose and that file looks like this:

services:
  database:
    image: postgres
    environment:
      - POSTGRES_PASSWORD= {{ DB_PASSWORD }}
      - POSTGRES_USER={{ DB_USER }}
    ports:
      - 5432:5432
    restart: always
    networks:
      - backend
  logger-service:
    environment:
      - LOG_DATABASE_URL= postgresql://{{ DB_USER }}:{{DB_PASSWORD}}@database:5432/log
      - LOGGER_PORT= {{ LOGGER_PORT }}
      - DB_LOGGER_ENVIORMENT= {{ LOGGER_ENV }}
    image: ghcr.io/bednaz98/db-logger:main
    ports:
      - {{ LOGGER_PORT }}:{{ LOGGER_PORT }}
    restart: always
    depends_on:
      - database
networks:
  backend:
    driver: bridge

When the logger service starts up, I can print that a db url string does exist in the contanier an I can print out the following when the prisma client is inialized and the string is added to the class constructor:

prisma client db string:  
- db type:  postgresql
- host ip: localhost:5432

I am using git packages to create a the docker container, and I event tried supplying a dumby db url string in the yaml env: postgresql://test:test@localhost:3000/log in hopes that maybe the prisma generated file needed it at that point. However it seems the program running in teh container can find the generate functions as expected.

Why would this not work in a container but but work running it directly though node (ts-node technically)?

I tried looking into the previous post and they did not work: