diff --git a/.tool-versions b/.tool-versions index 088198205..f6efb75ce 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1 @@ -nodejs 16.16.0 -yarn 1.22.19 +nodejs 18.17.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 02e131398..3c293f456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bug causing py-enigma code to disable stop button +### Changed + +- Docker config matches standalone, and bumped to node 18 (for parity) +- Runs yarn install when the container starts to avoid doing this manually + ## [0.28.6] - 2024-11-08 ### Fixed diff --git a/Dockerfile b/Dockerfile index c0281c054..2ad2eaddd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.13.1 +FROM node:18.17.1 ENV TZ='Europe/London' RUN apt-get update && apt-get install -y sudo curl wget vim git less zsh nodejs docker.io @@ -10,13 +10,12 @@ COPY package.json yarn.lock ./ COPY . /app RUN corepack enable \ - && corepack prepare yarn@stable --activate \ && yarn set version 3.4.1 \ - && echo -e "nodeLinker: node-modules\n\n$(cat /app/.yarnrc.yml)" > /app/.yarnrc.yml \ + && echo "nodeLinker: node-modules\n\n$(cat /app/.yarnrc.yml)" > /app/.yarnrc.yml \ && cat /app/.yarnrc.yml \ && printf "Switched to Yarn version: "; yarn --version -RUN yarn +RUN chsh -s $(which zsh) ${USER} EXPOSE 3011 diff --git a/docker-compose.yml b/docker-compose.yml index 0068917f3..d1ecbd1ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,18 +3,14 @@ x-app: &x-app context: . volumes: - .:/app + - node_modules:/app/node_modules - /var/run/docker.sock:/var/run/docker.sock - - /app/.yarn - - $PWD/.yarn/plugins:/app/.yarn/plugins - - $PWD/.yarn/releases:/app/.yarn/releases - - $PWD/.yarn/patches:/app/.yarn/patches - - $PWD/.yarn/sdks:/app/.yarn/sdks - - $PWD/.yarn/versions:/app/.yarn/versions stdin_open: true services: - react-ui-wc: + app: <<: *x-app - command: yarn start + command: sh -c "yarn install && yarn start" ports: - "3011:3011" - container_name: react-ui-wc +volumes: + node_modules: null