Skip to content

Commit 1455d32

Browse files
authored
Updates docker config to match standalone, and run yarn install and yarn start on container start (#1136)
Ready for review - Update docker config to match standalone - run yarn install and yarn start on container start
1 parent 7f14753 commit 1455d32

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

.tool-versions

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
nodejs 16.16.0
2-
yarn 1.22.19
1+
nodejs 18.17.1

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1212

1313
- Bug causing py-enigma code to disable stop button
1414

15+
### Changed
16+
17+
- Docker config matches standalone, and bumped to node 18 (for parity)
18+
- Runs yarn install when the container starts to avoid doing this manually
19+
1520
## [0.28.6] - 2024-11-08
1621

1722
### Fixed

Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16.13.1
1+
FROM node:18.17.1
22

33
ENV TZ='Europe/London'
44
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 ./
1010
COPY . /app
1111

1212
RUN corepack enable \
13-
&& corepack prepare yarn@stable --activate \
1413
&& yarn set version 3.4.1 \
15-
&& echo -e "nodeLinker: node-modules\n\n$(cat /app/.yarnrc.yml)" > /app/.yarnrc.yml \
14+
&& echo "nodeLinker: node-modules\n\n$(cat /app/.yarnrc.yml)" > /app/.yarnrc.yml \
1615
&& cat /app/.yarnrc.yml \
1716
&& printf "Switched to Yarn version: "; yarn --version
1817

19-
RUN yarn
18+
RUN chsh -s $(which zsh) ${USER}
2019

2120
EXPOSE 3011
2221

docker-compose.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@ x-app: &x-app
33
context: .
44
volumes:
55
- .:/app
6+
- node_modules:/app/node_modules
67
- /var/run/docker.sock:/var/run/docker.sock
7-
- /app/.yarn
8-
- $PWD/.yarn/plugins:/app/.yarn/plugins
9-
- $PWD/.yarn/releases:/app/.yarn/releases
10-
- $PWD/.yarn/patches:/app/.yarn/patches
11-
- $PWD/.yarn/sdks:/app/.yarn/sdks
12-
- $PWD/.yarn/versions:/app/.yarn/versions
138
stdin_open: true
149
services:
15-
react-ui-wc:
10+
app:
1611
<<: *x-app
17-
command: yarn start
12+
command: sh -c "yarn install && yarn start"
1813
ports:
1914
- "3011:3011"
20-
container_name: react-ui-wc
15+
volumes:
16+
node_modules: null

0 commit comments

Comments
 (0)