Skip to content

Commit bc525bf

Browse files
committed
nodejs version upgrade
1 parent aa4dc2e commit bc525bf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.env.dist

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ XDEBUG_FILE_LINK_FORMAT="phpstorm://open?file=%f&line=%l"
134134
# Xdebug IDE configuration.
135135
PHP_IDE_CONFIG=serverName=symfony-docker
136136

137-
# Node JS available versions: 4.x, 5.x, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x, 20.x
138-
NODE_JS_VERSION=20.x
137+
# Node JS available versions: 16, 18, 20, 20, 21
138+
NODE_JS_VERSION=21
139139

140140
CLEAN_NGINX_LOGS=no
141141
CLEAN_SF_logs=no

commands/start.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ func doPhpBuild() {
276276

277277
if os.Getenv("PHP_IMAGICK") == "yes" {
278278
util.Sed("__IMAGICK__", "&& cd /tmp && git clone https://github.com/Imagick/imagick && cd imagick && phpize && ./configure && make && make install && echo extension=imagick.so > /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini && rm -rf /tmp/imagick && cd /tmp", "config/php/Dockerfile")
279+
} else {
280+
util.Sed("__IMAGICK__", "", "config/php/Dockerfile")
279281
}
280282
}
281283

@@ -361,7 +363,7 @@ func doPhpBuild() {
361363
}
362364

363365
if os.Getenv("NODEJS") == "yes" {
364-
util.Sed("__NODEJS__", "&& mkdir -p /var/www/.npm && mkdir -p /var/www/html && printf '{\"name\": \"d4d\", \"version\": \"1.0.0\"}' > /var/www/html/package.json && chown -R $${USER_ID}:$${GROUP_ID} /var/www/.npm && chown -R $${USER_ID}:$${GROUP_ID} /var/www/html && printf 'Package: *\\nPin: origin deb.nodesource.com\\nPin-Priority: 600' > /etc/apt/preferences.d/nodejs && curl -sL https://deb.nodesource.com/setup_$${NODE_JS_VERSION} | bash && apt-get install -y nodejs && npm install --location=global __NPM_INSTALL_GLOBAL__ \\\n ", "config/php/Dockerfile")
366+
util.Sed("__NODEJS__", "&& mkdir -p /var/www/.npm && mkdir -p /var/www/html && printf '{\"name\": \"d4d\", \"version\": \"1.0.0\"}' > /var/www/html/package.json && chown -R $${USER_ID}:$${GROUP_ID} /var/www/.npm && chown -R $${USER_ID}:$${GROUP_ID} /var/www/html && mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && NODE_MAJOR=$${NODE_JS_VERSION} && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$${NODE_MAJOR}.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install -y nodejs && npm install --location=global __NPM_INSTALL_GLOBAL__ \\\n ", "config/php/Dockerfile")
365367
} else {
366368
util.Sed("__NODEJS__", "", "config/php/Dockerfile")
367369
}

0 commit comments

Comments
 (0)