#Container event container died

39 messages · Page 1 of 1 (latest)

bright vector
#

How do i fix this issue? I'm trying to deploy with the docker but it seems to have a issue about container being died everytime

tacit condorBOT
#

Project ID: 4efcabcd-bcbb-448f-add5-e351605c91d6

bright vector
#

4efcabcd-bcbb-448f-add5-e351605c91d6

runic pewter
#

i dont see a project by that id?

bright vector
#

sorry my bad

#

Project ID: d9c81ecc-be61-45f1-a43c-355a7e7d9042

#

@runic pewter , can you see it now?

runic pewter
#

send your dockerfile please

bright vector
#
FROM node:18 AS base


WORKDIR /app

COPY package*.json ./

RUN npm install

FROM node:18-slim

WORKDIR /app

COPY --from=base /app .

EXPOSE 8000

runic pewter
#

try this -

FROM node:18

WORKDIR /app

COPY package.json package-lock.json ./

RUN npm ci

COPY . ./

CMD ["node", "src/app.js"]
bright vector
#

same issue

#

this is my composer file

version: '3.8'

services:
  backend:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - .:/app
      - /app/node_modules
    env_file:
      - .env
    ports:
      - "8000:8000"
    depends_on:
      - mongodb
    version: '3.8'

services:
  backend:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - .:/app
      - /app/node_modules
    env_file:
      - .env
    ports:
      - "8000:8000"
    depends_on:
      - mongodb

  mongodb:
    image: mongo:latest
    ports:
      - "27017:27017"
    volumes:
      - mongodb_data:/data/db
    command: ["mongod", "--quiet"]

volumes:
  mongodb_data:

  mongodb:
    image: mongo:latest
    ports:
      - "27017:27017"
    volumes:
      - mongodb_data:/data/db
    command: ["mongod", "--quiet"]

volumes:
  mongodb_data:
runic pewter
#

why have you commented out the CMD line?

#

we also dont support docker compose, you would need to deploy that mongodb yourself from our mongodb option

bright vector
#

ok thanks

runic pewter
bright vector
#

i have used the command in composer so

#

how can i link the app with mongodb then

runic pewter
#

please do not commit the .env file to github

runic pewter
bright vector
#

ok

#

thanks

runic pewter
bright vector
#

the mongodb container are crashing all the time, why is that?

#

@runic pewter

runic pewter
#

likely because it only has 500mb of storage

bright vector
#

the storage is not full

runic pewter
#

that doesn't matter, mongo simply needs more than 500mb available

bright vector
#

ok so, this is because of storage?

runic pewter
#

most likely

#

you would want to upgrade to the hobby plan and then grow the volume to 5gb

bright vector
#

if that fixes the issue, i will do it

#

i have spin up another container again again due to the crash

runic pewter
#

they would have also had 500mb volumes so the problem persists

bright vector
#

but we can see the storage is not full yet

bright vector
#

ok sure

#

thanks

runic pewter
#

!s