Supabase/realtime No HOST or PORT found

Trying to connect two postgres and subapase/realtime service together but the realtime won’t start properly and it throws FATAL: No HOST or PORT found error.

This is my gtilab-ci.yml file:

image: node:16.2.0-buster

stages:
  - my_job

my_job:
  stage: my
  services:
    - name: supabase/postgres:13.3.0
      command: ['postgres', '-c', 'wal_level=logical']
      alias: postgres
    - name: registry.shirberenj.ir/realtime:v0.15.0
      alias: realtime

  variables:
    PORT: '4000'
    POSTGRES_PORT: '5432'
    POSTGRES_HOST: postgres
    POSTGRES_PASSWORD: somePassword
    POSTGRES_USER: postgres
    POSTGRES_DB: ketabchi
    MINIO_PORT: '9000'
    REAL_TIME_TOKEN: 'SOMESECRET'
    REAL_TIME_URL: 'ws://realtime:4000/socket'
    DB_HOST: 'postgres'
    DB_NAME: ketabchi
    DB_USER: postgres
    DB_PASSWORD: somePassword,
    DB_PORT: '5432'
    JWT_SECRET: SOMESECRET
    SECURE_CHANNELS: 'false'
  script:
    - echo "hi"

No matter running locally with gitlab-runner exec docker my_job or in my server I get the error mentioned above.

This is the full output:

Runtime platform                                    arch=amd64 os=linux pid=3931475 revision=8b63c432 version=14.3.1
WARNING: You most probably have uncommitted changes.
WARNING: These changes will not be tested.
Running with gitlab-runner 14.3.1 (8b63c432)
Preparing the "docker" executor
Using Docker executor with image node:16.2.0-buster ...
Starting service supabase/postgres:13.3.0 ...
Pulling docker image supabase/postgres:13.3.0 ...
Using docker image sha256:4c10fb4b98624d9d2ade053692ab5c89f251558063d983c62900a388fb7ccf10 for supabase/postgres:13.3.0 with
 digest supabase/postgres@sha256:9161d8cd63641a569acf7f81ac409cbea4cfb0d192ed6bd6e6e326176d2882ed ...
Starting service registry.shirberenj.ir/realtime:v0.15.0 ...
Pulling docker image registry.shirberenj.ir/realtime:v0.15.0 ...
Using docker image sha256:5a9e4db4b86a6803531fc3e2a8c29bbbe12746683c4c1cd422d18b1ae6264de4 for registry.shirberenj.ir/realti
me:v0.15.0 with digest registry.shirberenj.ir/realtime@sha256:43397da2d639338cf795deb141c22fdcbc9a8ce0c48856c69ba886c2ecf45f
32 ...
Waiting for services to be up and running...

*** WARNING: Service runner--project-0-concurrent-0-0e9464e4a4965f1a-registry.shirberenj.ir__realtime-1 probably didn't star
t properly.

Health check error:
service "runner--project-0-concurrent-0-0e9464e4a4965f1a-registry.shirberenj.ir__realtime-1-wait-for-service" health check:
exit code 1

Health check container logs:
2021-10-17T08:45:18.210621722Z FATAL: No HOST or PORT found

Service container logs:


*********

Pulling docker image node:16.2.0-buster ...
Using docker image sha256:7493e35c7ffa6042748fe654285b11f9922684cdace9fdf34de782f0cba75170 for node:16.2.0-buster with digest node@sha256:ddc2ebfc3759299afb2085bba7648416e016b326389323a257c4f8d1da097c9c ...
Preparing environment
Running on runner--project-0-concurrent-0 via laptop...
Getting source from Git repository
ERROR: Failed to cleanup volumes
ERROR: Job failed (system failure): Error response from daemon: Cannot link to a non running container: /runner--project-0-concurrent-0-0e9464e4a4965f1a-registry.shirberenj.ir__realtime-1 AS /runner--project-0-concurrent-0-0e9464e4a4965f1a-predefined-1/registry.shirberenj.ir__realtime (exec.go:57:1s)
FATAL: Error response from daemon: Cannot link to a non running container: /runner--project-0-concurrent-0-0e9464e4a4965f1a-registry.shirberenj.ir__realtime-1 AS /runner--project-0-concurrent-0-0e9464e4a4965f1a-predefined-1/registry.shirberenj.ir__realtime (exec.go:57:1s)