R
Railway14mo 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
Percy14mo ago
Project ID: N/A
Brody
Brody14mo ago
can you build that dockerfile locally?
lasse
lasse14mo 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
Brody14mo ago
definitely do
lasse
lasse14mo ago
No description
Brody
Brody14mo ago
is this a known issue with bun and prisma?
lasse
lasse14mo ago
nope, have always worked locally with no problems
Brody
Brody14mo ago
i think you should check their respective github issues
lasse
lasse14mo ago
buns or prisma?
Brody
Brody14mo ago
both
lasse
lasse14mo ago
alr thanks
lasse
lasse14mo 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
Brody14mo ago
you are running bun install twice
lasse
lasse14mo ago
still the same
Brody
Brody14mo ago
do you have prisma as a dep?
lasse
lasse14mo 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
Brody14mo ago
are you installing dev deps?
lasse
lasse14mo ago
bun install should install dev deps?
Brody
Brody14mo ago
i dont know, im not a js dev, sorry
ClearMist
ClearMist14mo ago
you require nodejs as well installed
lasse
lasse14mo 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
lasse14mo 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