Skip to content

Commit

Permalink
Updates docker config to match standalone, and run yarn install and y…
Browse files Browse the repository at this point in the history
…arn start on container start (#1136)

Ready for review

- Update docker config to match standalone
- run yarn install and yarn start on container start
  • Loading branch information
danhalson authored Nov 15, 2024
1 parent 7f14753 commit 1455d32
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
nodejs 16.16.0
yarn 1.22.19
nodejs 18.17.1
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down
14 changes: 5 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1455d32

Please sign in to comment.