Skip to content

Commit a3ad8ed

Browse files
authored
Merge pull request #224 from LibreCodeCoop/chore/update-node-setup
chore: update node setup
2 parents c0b53d2 + 6a17522 commit a3ad8ed

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.docker/php/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM php:8.3-fpm
22

3-
ARG NODE_MAJOR=20
4-
53
RUN apt-get update \
64
&& apt-get install -y \
75
git \
@@ -28,11 +26,15 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | ba
2826
&& nvm install 20 \
2927
&& nvm alias default 20
3028

29+
ENV NVM_DIR /root/.nvm
30+
ENV NODE_PATH $NVM_DIR/v20/lib/node_modules
31+
ENV PATH $NVM_DIR/v20/bin:$PATH
32+
3133
RUN echo "alias jigsaw=./vendor/bin/jigsaw" >> /etc/bash.bashrc && \
3234
echo "alias compile='./vendor/bin/jigsaw build'" >> /etc/bash.bashrc && \
3335
/bin/bash -c "source /etc/bash.bashrc"
3436

3537
WORKDIR /var/www/html
3638

3739
COPY entrypoint.sh /var/www/scripts/
38-
ENTRYPOINT [ "bash", "/var/www/scripts/entrypoint.sh" ]
40+
ENTRYPOINT [ "bash", "/var/www/scripts/entrypoint.sh" ]

.docker/php/entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
. "$NVM_DIR/nvm.sh"
4+
35
# Set uid of host machine
46
usermod --non-unique --uid "${HOST_UID}" www-data
57
groupmod --non-unique --gid "${HOST_GID}" www-data

docker-compose.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ services:
55
ports:
66
- 127.0.0.1:${HTTP_PORT:-80}:80
77
volumes:
8-
- .docker/nginx/:/etc/nginx/conf.d/
8+
- .docker/nginx/:/etc/nginx/conf.d/
99
- ./build_local:/var/www/html
1010

1111
php:
1212
build:
1313
context: .docker/php
14-
args:
15-
- NODE_MAJOR=${NODE_MAJOR:-20}
1614
ports:
1715
- "127.0.0.1:${HTTP_PORT:-3000}:3000"
1816
- "127.0.0.1:${HTTP_PORT_BROWSERSYNC:-3001}:3001"
@@ -25,4 +23,4 @@ services:
2523
- TZ=${TZ:-America/Sao_Paulo}
2624
- XDEBUG_CONFIG=${XDEBUG_CONFIG:-client_host=172.17.0.1 start_with_request=yes}
2725
- XDEBUG_MODE=${XDEBUG_MODE:-debug}
28-
- APP_ENV=${APP_ENV:-develop}
26+
- APP_ENV=${APP_ENV:-develop}

0 commit comments

Comments
 (0)