N
N
nathan1117772021-10-22 14:51:27
Drupal
nathan111777, 2021-10-22 14:51:27

What did I write wrong in the configs of the node.js service required for the Bootstrap 4 SASS - Barrio subtheme?

I have Ubuntu 20.04. I am building a Drupal site on docker, namely docker4drupal (a set of ready-made php images, nginx, mariadb, etc.)
https://github.com/wodby/docker4drupal

We need to create a subtheme based on Bootstrap 4 SASS - Barrio .
In the instructions on drupal.org, it says that for this theme you need to install node.js , gulp , and all the necessary dependencies for gulp so that it can compile sass to css:
https://www.drupal.org/docs/contributed-themes/boo ...

In docker-compose.yml, I wrote the following configs 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'


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

After starting the containers docker-compose up -dand checking docker ps, I see that the node.js container is not running:
6172a3ce64456371859132.png
In the docker-compose.yml file, I ruled only three lines working_dir , volumes , command . And I suspect that I wrote something wrong in the last two.

.env file:
### --- 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 ?

PS:
For readability, I will write you commands in the column I wrote in command in the docker-compose.yml file :

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'

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