Are you using M1 Mac? If yes, then this is related to #8478

You can try adding openssl once though in the image by adding RUN apk update && apk add nodejs npm openssl python g++ make && rm -rf /var/cache/apk/*, otherwise I will suggest you to use node:18-slim image.

🌐
egghead.io
egghead.io › q › docker-and-prisma-and-python
Learn Docker, Prisma and Python | egghead.io
python · docker · prisma · react · javascript · node · Instructors · Will Button · Chris Achard · Joel Lord · Mark Shust · Ryan Chenkie · Mridu Bhatnagar · Free or pro · pro · free · Content type · lesson · course · podcast · talk · Level Up Your Team ·
🌐
Prisma Client Python
prisma-client-py.readthedocs.io › en › stable › contributing › contributing
How to Contribute - Prisma Client Python - Read the Docs
We also use a docker build arg for the OS_DISTRO so that we can try and test against several of the official upstream Python docker image flavors.
Discussions

How to implement docker with prisma?
Here's my Dockerfile: FROM node:18-alpine as base WORKDIR /home/node/app COPY package.json yarn.lock ./ RUN yarn install COPY tsconfig.json ./ COPY src ./src COPY .env ./ COPY prisma ./prisma R... More on github.com
🌐 github.com
2
1
Python Prisma hangs on disconnect() when inside Docker container - Stack Overflow
I have a very basic service where I am trying to access a database in Python using the Prisma package. I have a Docker container that I build and run with hypercorn to host the service. When I find... More on stackoverflow.com
🌐 stackoverflow.com
February 21, 2024
Prisma Client not working properly in Docker Container
Its working like all things that ... when the docker container was made, it stays like no edits are occurring on the database and I think thats because of wrong Prisma Client generation. ... FROM node:20-alpine AS base # Install dependencies only when needed FROM base AS deps RUN apk add --no-cache libc6-compat g++ python3 openjdk11 ... More on github.com
🌐 github.com
3
1
node.js - How to use Prisma to generate database tables in Docker - Stack Overflow
Goal I'm trying to make a minimal Express app. It has a single endpoint /users that either GETs all users in a Postgres database, or POSTs a new user. I'm trying to use Prisma as an ORM and run More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com › r/node › how to dockerize node + prisma
r/node on Reddit: How to dockerize Node + Prisma
April 3, 2023 -

TLDR: Does anyone have a tutorial on how to set up Node (Next.js) + Prisma + Postgres with Docker Compose in 2023?

Hey everyone! I'm a junior Python developer who has been getting into web dev lately, and I've been struggling on a problem for days without a solution. I was hoping someone here might be able to help!

Specifically, I'm having trouble dockerizing a Next.js application that uses Prisma + Postgres. I'm hoping someone might be able to provide some guidance on how to do this in 2023. All of the tutorials I've seen have had different methods of doing this, some using deprecated compose features, some setting up Prisma as a separate service, etc. Any guidance is appreciated!

🌐
AbandonTech
blog.abandontech.cloud › easy-python-web-backend-using-fastapi-postgres-and-prisma
Easy Python Web Backend Using FastAPI, Prisma, Postgres, and Docker
March 9, 2023 - ENTRYPOINT ["/bin/bash", "-c"] CMD ["poetry run prisma db push --schema prisma/schema.prisma && poetry run uvicorn awesome_project:app --host 0.0.0.0 --port 80 $uvicorn_extras"] Once your project is configured, you can run your app using docker compose.
🌐
Prisma
prisma.io › home › docker › docker › docker
How to use Prisma in Docker | Prisma Documentation
This guide walks you through setting up a Prisma ORM application within a Docker environment. You'll learn how to configure a Node.js project, integrate Prisma for database management, and orchestrate the application using Docker Compose.
🌐
Stack Overflow
stackoverflow.com › questions › 78036520 › python-prisma-hangs-on-disconnect-when-inside-docker-container
Python Prisma hangs on disconnect() when inside Docker container - Stack Overflow
February 21, 2024 - However, when inside of the Docker container, the service hangs on the disconnect() call. When I test locally, it can successfully disconnect. Here is the entire file: import json from prisma import Prisma from quart import Quart import logging logging.basicConfig() logging.getLogger('prisma').setLevel(logging.DEBUG) app = Quart(__name__) @app.route("/") async def hello_world(): projects = None print("trying query...") async with Prisma() as prisma: projects = await prisma.project.find_many() print(projects) print("query successful") return json.dumps(list(map(lambda proj: proj.model_dump_json(), projects))) # For local testing, enable this line # app.run()
Find elsewhere
🌐
GitHub
github.com › sssano › Try-Prisma-Client-Python
GitHub - sssano/Try-Prisma-Client-Python
Contribute to sssano/Try-Prisma-Client-Python development by creating an account on GitHub.
Author   sssano
Top answer
1 of 1
2

Hi @Story27 👋

In your docker file, you are generating the Prisma client multiple times. This is unnecessary and can be optimized. You should generate the Prisma client only once during the build stage. You should also ensure that the node_modules directory is correctly copied from the builder stage to the runner stage. Try out this revised docker file:

FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat g++ python3 openjdk11
WORKDIR /app

# Install dependencies
COPY package.json package-lock.json* ./
RUN npm ci

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/package-lock.json ./package-lock.json
COPY . .
COPY prisma ./prisma

ENV NEXT_TELEMETRY_DISABLED 1

# Generate Prisma client
RUN npx prisma generate --schema=./prisma/schema.prisma

RUN npm run build

# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app

# Install g++ in the runner stage
RUN apk add --no-cache g++

ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next

# Create necessary directories and set permissions
RUN mkdir -p /app/Executed-codes/codes /app/Executed-codes/outputs /app/Executed-codes/inputs
RUN chown -R nextjs:nodejs /app/Executed-codes

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

# Copy Prisma files
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma

USER nextjs

EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME "0.0.0.0"

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "server.js"]
🌐
Stack Overflow
stackoverflow.com › questions › 75954535 › how-to-use-prisma-to-generate-database-tables-in-docker
node.js - How to use Prisma to generate database tables in Docker - Stack Overflow
That means that I'm assuming that no existing database volume exists, so, upon building the images, Docker needs to · Create a users database in the Postgres container (? I'm not sure if this is created by default as defined in the connection URL) Create a users table within that database, which I'm hoping to do with npx prisma db push so that the schema.prisma file is used
🌐
GitHub
github.com › topics › prisma
prisma · GitHub Topics · GitHub
All 22,644 TypeScript 18,766 JavaScript ... HTML 149 Python 117 Svelte 90 CSS 72 Go 38 Rust 32 Dart 30 ... This is a Full Stack application created for people who struggle to split bills with other people! The main focus of the app is to control expenses and share bills with friends. nodejs docker aws front-end express typescript styled-components reactjs rest-api postgresql back-end prisma ...
🌐
Adamjberkowitz
adamjberkowitz.com › blog › post › starting-with-prisma-and-docker
Adam Berkowitz - Starting with Prisma and Docker
When you install prisma in your project and use the prisma init command, the CLI lets you choose to use a new or existing database and have it "Set up a new Prisma server for local development (based on docker-compose)".
🌐
Prisma
v1.prisma.io › docs › 1.34 › prisma-server › deployment-environments › docker-rty1
Prisma 1.34 - Docker
To monitor and log slow queries, you can set the following environment variables in your Docker Compose file: SLOW_QUERIES_LOGGING: Enable slow query logging with true or false · SLOW_QUERIES_LOGGING_THRESHOLD: The treshold (in miliseconds) for queries for queries to be logged. To log all queries, simply provide the value "0". ... version: '3' services: prisma: image: prismagraphql/prisma:__LATEST_PRISMA_VERSION__ restart: always ports: - '4466:4466' environment: SLOW_QUERIES_LOGGING: 'true' SLOW_QUERIES_LOGGING_THRESHOLD: '0' PRISMA_CONFIG: | managementApiSecret: __YOUR_MANAGEMENT_API_SECRET__ port: __YOUR_PRISMA_SERVER_PORT__ databases: default: connector: __YOUR_DATABASE_CONNECTOR__ host: __YOUR_DATABASE_HOST__ port: __YOUR_DATABASE_PORT__ user: __YOUR_DATABASE_USER__ password: __YOUR_DATABASE_PASSWORD__ connectionLimit: __YOUR_CONNECTION_LIMIT__
🌐
GitHub
gist.github.com › wetrustinprize › 441b70fb12e61983ecb1debd5b35e53b
Prisma in Docker · GitHub
Prisma in Docker · Raw · May 6, 2022.md · Add this script to your package.json. { "scripts": { "prisma": "docker-compose exec main npx prisma" } } Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment ·
🌐
Docker Hub
hub.docker.com › r › prismagraphql › prisma
prismagraphql/prisma - Docker Image
The Docker CLI⁠ and Docker Compose CLI⁠ are used to manage the Prisma servers.
🌐
GitHub
github.com › mykter › prisma-cloud-pipeline
GitHub - mykter/prisma-cloud-pipeline: Export Prisma Cloud container findings to a CI pipeline, and identify un-triaged findings. · GitHub
To run the tool locally, Python 3.8+ is required. Try this from a directory that contains a triage.yaml file with your rules: pip install prisma-cloud-pipeline export TOKEN=$(http $API/v1/authenticate username=$USER password=$PASS | jq -r .token) prisma-cloud-pipeline --api=$API --rules=triage.yaml --collections=mycol,anothercol --results=results.json · You can of course also use the Docker container locally, instead of installing via pip.
Starred by 6 users
Forked by 2 users
Languages   Python 92.9% | Makefile 3.9% | Dockerfile 3.2%
🌐
GitHub
github.com › grdnmsz › prisma-docker
GitHub - grdnmsz/prisma-docker: Template project to bootstrap a back-end application with nodejs (express), postgresql and prisma within a docker container. · GitHub
Template project to bootstrap a back-end application with nodejs (express), postgresql and prisma within a docker container. - grdnmsz/prisma-docker
Starred by 37 users
Forked by 7 users
Languages   TypeScript 85.5% | Dockerfile 14.5%
🌐
GitHub
github.com › Jimmy1186 › docker-prisma-example
GitHub - Jimmy1186/docker-prisma-example
This project demonstrates a Dockerized Prisma setup for testing purposes.
Forked by 2 users
Languages   Shell 83.2% | JavaScript 12.1% | Dockerfile 4.7% | Shell 83.2% | JavaScript 12.1% | Dockerfile 4.7%