b310-digital / b310-digital/teammapper

Ineffective environmental variables

Open
#1,068 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
496
Forks
41
Avg merge
2h 16m
Merged PRs (30d)
11

Description

**Deploy**

- podman5
- podman-compose

**Config**

```
networks:
podman:
external: true
services:
teammapper:
name: tm
image: b310-digital/teammapper:v0.2.0-9
networks:
podman:
ipv4_address: 10.88.0.6
ports:
- 2111:3000
environment:
MODE: PROD
BINDING: "0.0.0.0"
POSTGRES_DATABASE: tmdb
POSTGRES_HOST: 10.88.0.3
POSTGRES_PASSWORD:
POSTGRES_PORT: 5432
POSTGRES_SSL: false
POSTGRES_SSL_REJECT_UNAUTHORIZED: false
POSTGRES_USER: tm
POSTGRES_QUERY_TIMEOUT: 100000
POSTGRES_STATEMENT_TIMEOUT: 100000
DELETE_AFTER_DAYS: 21
```

**Log**

Looking for the database ...
Found database.
Starting the application...

> teammapper@0.0.4 migrate:prod /home/node/app
> pnpm --filter teammapper-backend run prod:typeorm:migrate

> teammapper-backend@0.1.9 prod:typeorm:migrate /home/node/app/teammapper-backend
> typeorm migration:run --dataSource dist/data-source.js

Error during migration run:
Error: The server does not support SSL connections
at Socket. (/home/node/app/node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/connection.js:76:37)
at Object.onceWrapper (node:events:639:26)
at Socket.emit (node:events:524:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
/home/node/app/teammapper-backend:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  teammapper-backend@0.1.9 prod:typeorm:migrate: `typeorm migration:run --dataSource dist/data-source.js`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

> teammapper@0.0.4 start:prod /home/node/app
> pnpm --filter teammapper-backend run start:prod

**Test**

Whether setting true or false for POSTGRES_SSL, the log output remains the same.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the production configuration and the teammapper-backend TypeORM migration command shown in the log. Reproduce the migration against the configured PostgreSQL server with POSTGRES_SSL set to both true and false, then trace why the setting has no effect. Done means the false setting permits migration against a server that does not support SSL and the resulting startup behavior is documented by a test or verified log.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.