I have these docker compose configs and launch using the command docker compose up -d --build. But when I go to the url http://localhost:8000 I get the shown error from chrome. I can also see my node server is up with the standard message listening at port 8000
// Dockerfile
FROM node:18
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json", "tsconfig.json", "./"]
COPY ./src ./src
RUN npm install
CMD npm run build:start # build:start builds and then starts the server
// docker-compose.yml
version: "3.4"
services:
server:
image: chatterserver
build: .
environment:
NODE_ENV: development
ports:
- 8000:8000
depends_on:
- db
volumes:
- .:/usr/src/app
db:
image: postgres:14-alpine
environment:
POSTGRES_PASSWORD: dechat
POSTGRES_USER: dechat
POSTGRES_DB: dechat
ports:
- 5432:5432
volumes:
- ./dbdata:/var/lib/postgresql/data