Skip to content

Commit b1d75fb

Browse files
authored
fix: local development using docker not working with pnpm (@fehmer) (monkeytypegame#6401)
!nuf
1 parent 818e72f commit b1d75fb

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

backend/docker/compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ services:
2121

2222
api-server:
2323
container_name: monkeytype-api-server
24-
image: node:20.16.0
24+
build:
25+
dockerfile_inline: |
26+
FROM node:20.16.0
27+
RUN npm i -g [email protected]
28+
RUN mkdir /pnpm-store && chown -R 1000:1000 /pnpm-store
2529
user: "node" ##this works as long as your local user has uid=1000
2630
restart: on-failure
2731
depends_on:
@@ -36,7 +40,7 @@ services:
3640
- ../../:/monkeytype
3741
entrypoint: 'bash -c "echo starting, this may take a while... \
3842
&& cd /monkeytype \
39-
&& npm i -g pnpm \
43+
&& pnpm config set store-dir /pnpm-store
4044
&& pnpm i \
4145
&& npm run dev-be"'
4246

frontend/docker/compose.dev.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: monkeytype
22
services:
33
frontend:
44
container_name: monkeytype-frontend
5-
image: node:20.16.0
5+
build:
6+
dockerfile_inline: |
7+
FROM node:20.16.0
8+
RUN npm i -g [email protected]
9+
RUN mkdir /pnpm-store && chown -R 1000:1000 /pnpm-store
610
user: "node" ##this works as long as your local user has uid=1000
711
# restart: on-failure
812
environment:
@@ -14,9 +18,7 @@ services:
1418
- ../../:/monkeytype
1519
entrypoint: 'bash -c "echo starting, this may take a while... \
1620
&& cd /monkeytype \
17-
&& npm i -g pnpm \
21+
&& pnpm config set store-dir /pnpm-store
1822
&& pnpm i \
1923
&& export SERVER_OPEN=false \
2024
&& npm run dev-fe"'
21-
22-

0 commit comments

Comments
 (0)