R
Railway15mo ago
lasse

bun prisma

So i tryed this Dockerfile, but not seems to work. Anyone mabye can help?
# Use the offical Bun image
FROM jarredsumner/bun:edge

# Set the Docker working directory as /usr/src/app
# Copy everything from here into Docker's /usr/src/app
WORKDIR /usr/
COPY . /usr/

# Install the dependencies
RUN bun install
# Run the Bao.js webserver
CMD bun x prisma generate && bun run src/index.js
# Use the offical Bun image
FROM jarredsumner/bun:edge

# Set the Docker working directory as /usr/src/app
# Copy everything from here into Docker's /usr/src/app
WORKDIR /usr/
COPY . /usr/

# Install the dependencies
RUN bun install
# Run the Bao.js webserver
CMD bun x prisma generate && bun run src/index.js
24 Replies
Percy
Percy15mo ago
Project ID: N/A
Brody
Brody15mo ago
can you build that dockerfile locally?
lasse
lasseOP15mo ago
Never used Docker before just got it from a template on railway with baojs and that worked. Then i tryed for my discord bot let me know if you need the error
Brody
Brody15mo ago
definitely do
lasse
lasseOP15mo ago
No description
Brody
Brody15mo ago
is this a known issue with bun and prisma?
lasse
lasseOP15mo ago
nope, have always worked locally with no problems
Brody
Brody15mo ago
i think you should check their respective github issues
lasse
lasseOP15mo ago
buns or prisma?
Brody
Brody15mo ago
both
lasse
lasseOP15mo ago
alr thanks
lasse
lasseOP15mo ago
So the this is my dockerfile now
# Use the offical Bun image
FROM oven/bun:latest

# Set the Docker working directory as /usr/src/app
# Copy everything from here into Docker's /usr/src/app
WORKDIR /
COPY . /

# Install the dependencies
RUN bun install

# Run project
CMD bun install && bunx prisma generate && bun run src/index.js
# Use the offical Bun image
FROM oven/bun:latest

# Set the Docker working directory as /usr/src/app
# Copy everything from here into Docker's /usr/src/app
WORKDIR /
COPY . /

# Install the dependencies
RUN bun install

# Run project
CMD bun install && bunx prisma generate && bun run src/index.js
Bun told me to use "oven/bun:latest", but now it says all this @Brody
No description
Brody
Brody15mo ago
you are running bun install twice
lasse
lasseOP15mo ago
still the same
Brody
Brody15mo ago
do you have prisma as a dep?
lasse
lasseOP15mo ago
yes
{
"name": "@ora/core",
"module": "src/index.js",
"type": "module",
"scripts": {
"dev": "bun --watch src/index.js"
},
"devDependencies": {
"bun-types": "latest",
"prisma": "5.3.1",
"prompt-sync": "^4.2.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@prisma/client": "5.3.1",
"commandkit": "^0.1.3",
"discord.js": "^14.13.0",
"moment": "^2.29.4",
"ms": "^2.1.3",
"term-logger": "^1.1.9"

}
}
{
"name": "@ora/core",
"module": "src/index.js",
"type": "module",
"scripts": {
"dev": "bun --watch src/index.js"
},
"devDependencies": {
"bun-types": "latest",
"prisma": "5.3.1",
"prompt-sync": "^4.2.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@prisma/client": "5.3.1",
"commandkit": "^0.1.3",
"discord.js": "^14.13.0",
"moment": "^2.29.4",
"ms": "^2.1.3",
"term-logger": "^1.1.9"

}
}
Brody
Brody15mo ago
are you installing dev deps?
lasse
lasseOP15mo ago
bun install should install dev deps?
Brody
Brody15mo ago
i dont know, im not a js dev, sorry
ClearMist
ClearMist14mo ago
you require nodejs as well installed
lasse
lasseOP14mo ago
Whats the docker image for nodejs?
ClearMist
ClearMist14mo ago
node - Official Image | Docker Hub
Node.js is a JavaScript-based platform for server-side and networking applications.
lasse
lasseOP14mo ago
Thanks dosent seem to fix the error
ClearMist
ClearMist14mo ago
#OpenSSL error when using Bun + Prisma try the method over there
Want results from more Discord servers?
Add your server