Closed lihebi closed 9 months ago
Update: the setup
container is removed. We need to install node packages on the host for IDE linting anyway.
The new developer workflow:
bun install
cd packages/prisma
# e.g., "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public"
export DATABASE_URL=...
bunx prisma migrate dev
cd compose/web
docker compose up -d
TODOS:
Pnpm has one major problem: the
.pnpm-store
is not compatible with docker-stack. The problem is due to pnpm's choice to link folders instead of copying. Ref from https://pnpm.io/docker:This creates the problem that one can either install packages in docker stack, or on the host, but not both. This is pretty inconvenient.
Now bun 1.0 is available, and it seems to work well across the host and docker-stack.
Therefore, this PR uses bun as a package manager to replace pnpm.
TODOs:
node-with-bun.Dockerfile
withoven/bun:1
.