Recommand · October 22, 2021 0

What did I write incorrectly in the node.js service configurations required for the Bootstrap 4 – Barrio SASS subtheme?

I raise a Drupal site on docker, namely – docker4drupal (a set of already created images: php, nginx, mariadb, etc.)
https://github.com/wodby/docker4drupal

I need to create a subtheme based on Bootstrap 4 – Barrio SASS.
In the instructions on drupal.org writes that for this theme I need to install node.js, gulp, and all the required dependencies for gulp so that it can compile sass to css:
https://www.drupal.org/docs/contributed-themes/bootstrap-4-sass-barrio-starter-kit/installation

In docker-compose.yml, I wrote configurations like this for the node.js service:

node:
    image: wodby/node:$NODE_TAG
    container_name: "${PROJECT_NAME}_node"
    working_dir: /var/www/html/web/themes/custom/bootstrap_sass_bcnews
    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/web/themes/custom/bootstrap_sass_bcnews:/var/www/html
    command: sh -c 'apt-get install python3-software-properties gnupg2 curl wget -y && curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash - && sudo apt-get install -y nodejs && cd /var/www/html/web/themes/custom/bootstrap_sass_bcnews && npm install --global gulp-cli && npm install'

The path to the Drupal project on my system: /home/perceval/Desktop/bcnews_project
The path to the theme in the container: /var/www/html/web/themes/custom/bootstrap_sass_bcnews

After running containers docker-compose up -d and checks docker ps, I see that the node.js container is not running:

image
In file docker-compose.yml I only edited three lines working_dir, volumes, command. And I suspect I wrote something wrong in the last two.

File .env:

### --- NODE ---

NODE_TAG=12-dev-0.84.0

What is the problem? And in general, did I write the commands correctly in the command line?

P.S. For ease of reading, I will write you the commands from the line written in the command: from the file docker-compose.yml here:

 sh -c 'apt-get install python3-software-properties gnupg2 curl wget -y &&
 curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash - &&
 sudo apt-get install -y nodejs &&
 cd /var/www/html/web/themes/custom/bootstrap_sass_bcnews && 
 npm install --global gulp-cli &&
 npm install'