N
N
nathan1117772021-10-09 23:05:21
Drupal
nathan111777, 2021-10-09 23:05:21

Why is the node.js container not running?

Hello! Perhaps someone worked with docker4drupal: https://github.com/wodby/docker4drupal
I have this problem: when I write a command in the terminal: docker ps the node.js container (I have bcnews_node) is not displayed in the list of running containers, although after writing the docker-compose up -d command next to this container, it says done:
6161f3a5d69b8704324414.png
Here is the given container in docker-composer.yml :

node:
    image: wodby/node:$NODE_TAG
    container_name: "${PROJECT_NAME}_node"
    working_dir: /var/www/html/path/to/theme/to/build
    labels:
    - "traefik.http.services.${PROJECT_NAME}_node.loadbalancer.server.port=3000"
    - "traefik.http.routers.${PROJECT_NAME}_node.rule=Host(`node.${PROJECT_BASE_URL}`)"
    expose:
    - "3000"
    volumes:
    - ./:/var/www/html
    command: sh -c 'yarn install && yarn run start'

And in the .env file it is written:
### --- NODE ---

NODE_TAG=16-dev-0.84.0


And the traefik container code from the docker-composer.yml file :
traefik:
    image: traefik:v2.0
    container_name: "${PROJECT_NAME}_traefik"
    command: --api.insecure=true --providers.docker
    ports:
    - '8000:80'
#    - '8080:8080' # Dashboard
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock


Do you have any guesses why this is happening? And how to fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question