fix: local development using docker not working with pnpm (@fehmer) (#6401)

!nuf
This commit is contained in:
Christian Fehmer 2025-03-26 13:11:02 +01:00 committed by GitHub
parent 818e72fecc
commit b1d75fb077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View file

@ -21,7 +21,11 @@ services:
api-server:
container_name: monkeytype-api-server
image: node:20.16.0
build:
dockerfile_inline: |
FROM node:20.16.0
RUN npm i -g pnpm@9.6.0
RUN mkdir /pnpm-store && chown -R 1000:1000 /pnpm-store
user: "node" ##this works as long as your local user has uid=1000
restart: on-failure
depends_on:
@ -36,7 +40,7 @@ services:
- ../../:/monkeytype
entrypoint: 'bash -c "echo starting, this may take a while... \
&& cd /monkeytype \
&& npm i -g pnpm \
&& pnpm config set store-dir /pnpm-store
&& pnpm i \
&& npm run dev-be"'

View file

@ -2,7 +2,11 @@ name: monkeytype
services:
frontend:
container_name: monkeytype-frontend
image: node:20.16.0
build:
dockerfile_inline: |
FROM node:20.16.0
RUN npm i -g pnpm@9.6.0
RUN mkdir /pnpm-store && chown -R 1000:1000 /pnpm-store
user: "node" ##this works as long as your local user has uid=1000
# restart: on-failure
environment:
@ -14,9 +18,7 @@ services:
- ../../:/monkeytype
entrypoint: 'bash -c "echo starting, this may take a while... \
&& cd /monkeytype \
&& npm i -g pnpm \
&& pnpm config set store-dir /pnpm-store
&& pnpm i \
&& export SERVER_OPEN=false \
&& npm run dev-fe"'