I'm a little confused because you would do it exactly the way you do. By starting the setup script via npm. Answer from ElevenNotes on reddit.com
🌐
npm
npmjs.com › package › prisma
prisma - npm
Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one..
      » npm install prisma
    
Published   Jul 20, 2026
Version   7.9.0
🌐
Prisma
prisma.io › home › postgresql › postgresql › postgresql
Quickstart: Prisma ORM with PostgreSQL (10 min) | Prisma Documentation
You can now invoke the Prisma CLI by prefixing it with npx: bun · pnpm · yarn · npm · bunx prisma · Next, set up your Prisma ORM project by creating your Prisma Schema file with the following command: bun · pnpm · yarn · npm · bunx --bun prisma init --datasource-provider postgresql --output ../generated/prisma ·
🌐
npm
npmjs.com › package › @prisma › client
@prisma/client - npm
Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases..
      » npm install @prisma/client
    
Published   Jul 20, 2026
Version   7.9.0
🌐
NestJS
docs.nestjs.com › recipes › prisma
Prisma | NestJS - A progressive Node.js framework
Prisma is an open-source ORM for Node.js and TypeScript. It is used as an alternative to writing plain SQL, or using another database access tool such as SQL query builders (like knex.js) or ORMs (like TypeORM and Sequelize).
🌐
GitHub
github.com › prisma › prisma
GitHub - prisma/prisma: Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB · GitHub
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - prisma/prisma
Starred by 47.4K users
Forked by 2.4K users
Languages   TypeScript 99.0% | JavaScript 0.9% | Shell 0.1% | Dockerfile 0.0% | PLpgSQL 0.0% | Batchfile 0.0%
🌐
Prisma
prisma.io
Prisma ORM
Prisma gives TypeScript and Node.js teams Prisma ORM, Prisma Postgres, and Prisma Compute: a type-safe ORM, managed Postgres, and Compute for deploying TypeScript apps, from schema to deployed app.
🌐
Prisma
prisma.io › orm
Prisma ORM | Type-Safe ORM for Node.js and TypeScript
Model data, run migrations, and query PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB with a type-safe ORM built for developer productivity.
Find elsewhere
🌐
npm
npmjs.com › package › @prisma › cli
@prisma/cli - npm
2 weeks ago - Command-line interface for the Prisma Developer Platform.. Latest version: 3.0.0-beta.29, last published: 15 hours ago. Start using @prisma/cli in your project by running `npm i @prisma/cli`. There are 19 other projects in the npm registry using @prisma/cli.
      » npm install @prisma/cli
    
Published   Jul 21, 2026
Version   3.0.0-beta.29
🌐
Reddit
reddit.com › r/docker › my project uses a centralized prisma repository as an npm package, how do i set this up with docker?
r/docker on Reddit: My project uses a centralized prisma repository as an npm package, how do I set this up with Docker?
March 3, 2024 -

I have a project that uses prisma and postgres for database management, this project is set up as an npm package in an effort to centralize it, as it will be used across multiple other different projects, so it is installed via `npm i <project-db>`. I am currently trying to set up a docker-compose file so that I can create the tables needed when setting up a fresh install of one of my projects that requires the database, but I'm not sure how to go about doing this since the database/prisma are all being managed by an npm package, and not directly. How would I go about setting things up so that when I run docker-compose, all the tables are created and things can just work?

In case that is a bit confusing of an explanation, I'll attempt to lay it out in a diagram to explain it better:

@username/project-db package.json, this is installed inside Project A repository (it's a dependency in Project A's package.json)

{
  ...
  "scripts": {
    "db:introspect": "dotenv -- prisma db pull",
    "db:generate": "dotenv -- prisma migrate",
    "postinstall": "npx prisma generate && tsc && cp src/index.d.ts dist/index.d.ts",
    "test": "exit 0"
  },
  ...
  "devDependencies": {
    "@types/node": "^20.10.0",
    "dotenv-cli": "^7.3.0",
    "prisma": "^5.6.0",
    "typescript": "^5.3.2"
  },
  "dependencies": {
    "@prisma/client": "^5.6.0"
  }
}

Dockerfile (Project A's repository)

ARG OWNER
FROM node:20-buster-slim
ENV NODE_ENV 'development'
ENV OWNER "username"

RUN apt-get update && apt-get install libssl-dev ca-certificates -y

# Create app directory
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package*.json .

# Setup npmrc
RUN --mount=type=secret,id=TOKEN \
    TOKEN=$(cat /run/secrets/TOKEN) && \
    echo //npm.pkg.github.com/:_authToken=${TOKEN} >> ~/.npmrc
RUN echo @${OWNER}:registry=https://npm.pkg.github.com/ >> ~/.npmrc

# Copy src files
COPY src/ src/

# Install packages
RUN npm ci
# ^ installs "project-db as a dependency"

# remove github token from npmrc
RUN echo > ~/.npmrc

# Creates prisma client
RUN npm explore @username/project-db -- npm run postinstall

# Build the project
RUN npm run build

# Run the start script in package.json
CMD ["npm", "run", "start"]

docker-compose for all services:

services:
  postgres:
        image: postgres:16.2
        container_name: postgres
        hostname: postgres
        environment:
            POSTGRES_USER: ${PSQL_USER}
            POSTGRES_PASSWORD: ${PSQL_PASS}
            POSTGRES_DB: ${PSQL_DB_NAME}
        ports:
            - ${PSQL_PORT}:${PSQL_PORT}
        restart: 'unless-stopped'
        volumes:
            - 'pg-data:/var/lib/postgresql/data'
        healthcheck:
            test: ['CMD-SHELL', 'pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER']
            interval: 10s
            timeout: 5s
            retries: 5
  projectA:
        build: 
            context: .
            secrets:
                - TOKEN
        container_name: projectA
        depends_on:
            postgres:
                condition: service_healthy
        tty: true
        env_file:
            - src/.env
volumes:
  pg-data:
    driver: local
secrets:
    TOKEN:
        environment: "TOKEN"

So now my question is: where do I put `npx prisma db push/migrate dev/whatever` so that my tables are actually created in the `postgres` container? I can see that the database itself is created but there are no tables in it.

🌐
npm
npmjs.com › package › @casl › prisma
@casl/prisma - npm
May 22, 2026 - We can use Prisma Query to define permissions, no need to learn MongoDB query language anymore. Additionally, we can ask our SQL database questions like: "Which records can be read?" or "Which records can be updated?". npm install @casl/prisma @casl/ability # or yarn add @casl/prisma @casl/ability # or pnpm add @casl/prisma @casl/ability
      » npm install @casl/prisma
    
Published   Jul 06, 2026
Version   2.0.2
🌐
Shopify
shopify.dev › docs › apps › build › scaffold-app
Scaffold an app
Creates your Prisma SQLite database · Creates a tunnel between your local machine and the dev store · To learn more about the processes that are executed when you run dev, refer to the Shopify CLI command reference. Caution · To use a dev store with Shopify CLI, you need to be the store owner, or have a staff account on the store.
🌐
Medium
medium.com › @vishnuravichandran.28 › mastering-prisma-a-guide-to-modern-database-management-with-node-js-c1d462db1632
Mastering Prisma: A Guide to Modern Database Management with Node.js | by Vishnuravichandran | Medium
December 30, 2025 - Okay let us understand using a Simple Prisma Example: User Model CRUD · npm install prisma — save-dev · npx prisma init · Set DATABASE_URL in .env (PostgreSQL example). Install client: npm install @prisma/client ·
🌐
npm
npmjs.com › package › @prisma › react-native
@prisma/react-native - npm
December 4, 2024 - A Prisma engine adaptation for React Native.
      » npm install @prisma/react-native
    
Published   Dec 04, 2024
Version   6.0.1
🌐
Prisma
prisma.io › home › next.js › next.js › next.js
How to use Prisma ORM and Prisma Postgres with Next.js and Vercel | Prisma Documentation
To get started with Prisma, you'll need to install a few dependencies: bun · pnpm · yarn · npm · bun add prisma tsx @types/pg --dev · bun · pnpm · yarn · npm · bun add @prisma/client @prisma/adapter-pg dotenv pg · If you are using a different database provider (MySQL, SQL Server, SQLite), install the corresponding driver adapter package instead of @prisma/adapter-pg.
🌐
Mondd
mondd.dev › post › blog › create-an-npm-package-for-your-prisma-client-a-step-by-step-guide
Blog - Create an NPM Package for Your Prisma Client: A Step-by-Step Guide | mondd.dev
Are you looking to share your Prisma client as an NPM package? This comprehensive guide will walk you through the process, making it easy to create, configure, and publish your Prisma client for others to use. Let's dive in!
🌐
Medium
medium.com › @newbmayur › prisma-orm-simplifying-database-management-in-node-js-300d481e0d97
Prisma ORM: Simplifying Database Management in Node.js | by B Mayur | Medium
December 31, 2024 - Install Prisma CLI and the required dependencies: npm install prisma --save-dev npm install @prisma/client · The prisma package is the CLI tool for managing Prisma, while @prisma/client is the auto-generated client for database interactions.
🌐
npm
npmjs.com › search
keywords:Prisma - npm search
Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database.
🌐
Better Stack
betterstack.com › community › guides › scaling-nodejs › prisma-orm
Getting Started with Prisma ORM for Node.js and PostgreSQL | Better Stack Community
A comprehensive guide to setting up Prisma ORM with Node.js and PostgreSQL, covering schema design, migrations, CRUD operations, and relationship handling