I’m trying to deploy a docker container using render. But I get the error message;
“Error: Data source DNS is empty. It’s a required field.” as shown below
I also get the same error when deploying to Playing with Docker in which I’m using docker compose up
Though, I’m able to successfully run this docker container locally on my laptop, but in order for me to scale my testing I need to host this on the cloud.
Here is my docker-compose.yaml file;
version: "3.8"
services:
server:
image: ${BLNK_IMAGE:-jerryenebeli/blnk:0.8.0}
container_name: server
restart: on-failure
entrypoint: ["/bin/sh", "-c"]
command:
- "blnk migrate up && blnk start"
environment:
TZ: ${TZ:-Etc/UTC}
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
ports:
- "5001:5001"
- "80:80"
- "443:443"
depends_on:
- redis
- postgres
- jaeger
volumes:
- ./blnk.json:/blnk.json
worker:
image: ${BLNK_IMAGE:-jerryenebeli/blnk:0.8.0}
container_name: worker
restart: on-failure
entrypoint: ["blnk", "workers"]
environment:
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
depends_on:
- redis
- postgres
- jaeger
volumes:
- ./blnk.json
redis:
image: redis:7.2.4
container_name: redis
postgres:
image: ${POSTGRES_IMAGE:-postgres:16}
container_name: ${POSTGRES_CONTAINER:-postgres}
restart: on-failure
ports:
- "${POSTGRES_OUTER_PORT:-5432}:5432"
environment:
TZ: ${TZ:-Etc/UTC}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-blnk}
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
typesense:
image: typesense/typesense:0.23.1
container_name: typesense
command:
["--data-dir", "/data", "--api-key=blnk-api-key", "--listen-port", "8108"]
volumes:
- typesense_data:/data
logging:
driver: "none"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8108/health"]
interval: 30s
timeout: 10s
retries: 5
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
environment:
- COLLECTOR_OTLP_ENABLED=true
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:16686"]
interval: 10s
timeout: 5s
retries: 3
volumes:
pg_data:
typesense_data:
Here is the blnk.json file that’s being used;
{
"project_name": "Blnk",
"data_source": {
"dns": "postgres://postgres:password@postgres:5432/blnk?sslmode=disable"
},
"redis": {
"dns": "redis:6379"
},
"server": {
"port": "5001"
}
}
I’m new to docker, so please help me with this error. Why am I getting the error “Data source DNS is empty. It’s a required field.” when deploying on the cloud.
Please help.