Skip to content

Commit

Permalink
Merge pull request #67 from LibreCodeCoop/chore/change-npm-setup
Browse files Browse the repository at this point in the history
Chore/change npm setup
  • Loading branch information
vitormattos authored May 16, 2024
2 parents 96c44f7 + 9c6f608 commit e455a98
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .docker/Dockerfile.php80
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
# pevent errors when try to create files at /var/www with user www-data
&& chown -R www-data /var/www

COPY --from=node:20.11-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node:20.11-slim /usr/local/bin/node /usr/local/bin/node
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
# Install NVM
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install 14 && nvm install 16 && nvm install 20 \
&& nvm alias default 20

COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY config/php/* /usr/local/etc/php/conf.d/
Expand Down
9 changes: 6 additions & 3 deletions .docker/Dockerfile.php81
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
# pevent errors when try to create files at /var/www with user www-data
&& chown -R www-data /var/www

COPY --from=node:20.11-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node:20.11-slim /usr/local/bin/node /usr/local/bin/node
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
# Install NVM
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install 14 && nvm install 16 && nvm install 20 \
&& nvm alias default 20

COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY config/php/* /usr/local/etc/php/conf.d/
Expand Down
9 changes: 6 additions & 3 deletions .docker/Dockerfile.php82
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
# pevent errors when try to create files at /var/www with user www-data
&& chown -R www-data /var/www

COPY --from=node:20.11-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node:20.11-slim /usr/local/bin/node /usr/local/bin/node
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
# Install NVM
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install 14 && nvm install 16 && nvm install 20 \
&& nvm alias default 20

COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY config/php/* /usr/local/etc/php/conf.d/
Expand Down
2 changes: 2 additions & 0 deletions .docker/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ EOF

occ config:app:set core backgroundjobs_mode --value "cron"

occ config:system:set auth.bruteforce.protection.enabled --value false --type boolean

if [ ! -d "apps-extra/hmr_enabler" ]; then
git clone --progress --single-branch --depth 1 https://github.com/nextcloud/hmr_enabler apps-extra/hmr_enabler
composer -d apps-extra/hmr_enambler/ i
Expand Down

0 comments on commit e455a98

Please sign in to comment.