diff --git a/README.md b/README.md index c69c4a432..c5e9f370a 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ glance: entrypoint. * A `dev-app` service/container based on `agdsn/pycroft-dev` derived from `agdsn/pycroft-base`. The development image contains additional packages - for development, e.g. `gcc`, `yarn`. The service uses two persistent volumes: + for development, e.g. `gcc`, `npm`. The service uses two persistent volumes: * the home directory `/opt/pycroft` of the `pycroft` user, that contains among other things, the virtual environment, the pip cache, and the `.bash_history`. @@ -81,7 +81,7 @@ glance: optimized in-memory database. * A `prod-app` service/container based on `agdsn/pycroft-prod`, which is based on `agdsn/pycroft-base` that contains only the basics that are required for - running Pycroft without development tools, such as `gcc` or `yarn`. + running Pycroft without development tools, such as `gcc` or `npm`. Pycroft and its dependencies are build using an instance of the `agdsn/pycroft-develop` image using the [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) @@ -403,10 +403,10 @@ alias drc=docker-compose ### Webpack appears to be missing a library -Re-Install everything using yarn, and re-run the webpack entrypoint. +Re-Install everything using npm, and re-run the webpack entrypoint. ```sh -drc run --rm dev-app shell yarn install +drc run --rm dev-app shell npm install drc run --rm dev-app webpack ``` diff --git a/docker/base/container/commands/version b/docker/base/container/commands/version index cd432e851..d9f192f5d 100755 --- a/docker/base/container/commands/version +++ b/docker/base/container/commands/version @@ -25,7 +25,6 @@ run() { EOF fi [[ -x nodejs ]] && echo "NodeJS: $(nodejs --version)" || : - [[ -x yarn ]] && echo "yarn: $(yarn --version)" || : } [[ "$0" == "$BASH_SOURCE" ]] && run "$@" || : diff --git a/docker/dev.Dockerfile b/docker/dev.Dockerfile index ef0d63df1..484db9a90 100644 --- a/docker/dev.Dockerfile +++ b/docker/dev.Dockerfile @@ -11,7 +11,6 @@ COPY etc/apt /etc/apt # Install Debian packages # Build-essential is needed For compiling things in pip RUN apt-key add /etc/apt/keys/nodesource.gpg.key \ - && apt-key add /etc/apt/keys/yarnpkg.gpg.key \ && apt-get update \ && apt-get install -y --no-install-recommends \ bash \ @@ -27,7 +26,6 @@ RUN apt-key add /etc/apt/keys/nodesource.gpg.key \ strace \ unzip \ vim \ - yarn \ && apt-get clean COPY . / diff --git a/docker/dev/container/commands/webpack b/docker/dev/container/commands/webpack index f936d8ae7..1d20b2e86 100755 --- a/docker/dev/container/commands/webpack +++ b/docker/dev/container/commands/webpack @@ -11,7 +11,7 @@ readonly DESCRIPTION=( run() { cd /opt/pycroft/app - exec yarn run webpack --require @babel/register --config webpack.config.babel.js "$@" + exec npm run webpack --require @babel/register --config webpack.config.babel.js "$@" } [[ "$0" == "$BASH_SOURCE" ]] && run "$@" || : diff --git a/docker/dev/container/hooks/init/20_yarn b/docker/dev/container/hooks/init/20_yarn index 96231bdbf..f21db08f9 100755 --- a/docker/dev/container/hooks/init/20_yarn +++ b/docker/dev/container/hooks/init/20_yarn @@ -8,4 +8,4 @@ if [[ -d node_modules ]] && $(shopt -s nullglob dotglob; files=(node_modules/*); exit fi -yarn install --network-concurrency 1 +npm install diff --git a/docker/dev/etc/apt/sources.list.d/yarnpkg.list b/docker/dev/etc/apt/sources.list.d/yarnpkg.list deleted file mode 100644 index 813bbbfa9..000000000 --- a/docker/dev/etc/apt/sources.list.d/yarnpkg.list +++ /dev/null @@ -1 +0,0 @@ -deb http://dl.yarnpkg.com/debian/ stable main diff --git a/docker/prod.Dockerfile b/docker/prod.Dockerfile index 2f672b50d..ddea3ff41 100644 --- a/docker/prod.Dockerfile +++ b/docker/prod.Dockerfile @@ -12,11 +12,11 @@ RUN /opt/pycroft/venv/bin/pip wheel --wheel-dir /opt/pycroft/wheel -r requiremen # Download JS/CSS dependencies COPY --chown=pycroft:pycroft package.json . -RUN yarn install --network-concurrency 1 +RUN npm install # Build Pycroft wheel COPY --chown=pycroft:pycroft . . -RUN yarn run --prod build +RUN npm run --prod build RUN /opt/pycroft/venv/bin/pip wheel --no-deps --wheel-dir /opt/pycroft/wheel . FROM agdsn/pycroft-base