diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f9fef65..218ccf9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,7 +6,7 @@ RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ # Install MariaDB client and dependencies RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get install -y mariadb-client libpng-dev libjpeg-dev libfreetype6-dev libgmp-dev redis nginx nodejs npm yarn + && apt-get install -y mariadb-client libpng-dev libjpeg-dev libfreetype6-dev libgmp-dev redis nginx # && apt-get clean -y && rm -rf /var/lib/apt/lists/* RUN \ @@ -61,5 +61,20 @@ RUN chmod 0755 /bin/start-nginx \ && chmod 0755 /bin/start \ && chmod -R 0755 /etc/redis -# [Optional] Uncomment this line to install global node packages. -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 +# Node.js env setup +# ref: https://nodejs.org/en/download/package-manager#debian-and-ubuntu-based-linux-distributions +# -> https://github.com/nodesource/distributions + +RUN \ + sudo apt-get update; \ + sudo apt-get install -y ca-certificates curl gnupg; \ + sudo mkdir -p /etc/apt/keyrings; \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \ + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -; \ + echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list; \ + # set env + NODE_MAJOR=18; \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list; \ + # install + sudo apt-get update; \ + sudo apt-get install nodejs yarn -y diff --git a/composer.json b/composer.json index f295d6b..ad29c79 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,12 @@ }, "minimum-stability": "beta", "prefer-stable": true, - "repositories": [], + "repositories": [ + { + "type": "path", + "url": "packages/*" + } + ], "extra": { "patches": { "fof/upload": [ diff --git a/composer.lock b/composer.lock index c0d53bc..1bdc049 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "66b55362840da8c01195a5d46d1e0c21", + "content-hash": "1dcac109782e715444fad48e667dff76", "packages": [ { "name": "afrux/forum-widgets-core", diff --git a/packages/.gitkeep b/packages/.gitkeep new file mode 100644 index 0000000..e69de29