How to run drizzle-kit studio out of docker?

I'm trying to run drizzle-kit studio out of docker:
drizzle-studio:
build:
dockerfile: ./tools/Dockerfile
ports:
- 4983:4983
environment:
DATABASE_URL: postgresql://postgres:local@db:5432/postgres
restart: always
command: drizzle-kit studio
drizzle-studio:
build:
dockerfile: ./tools/Dockerfile
ports:
- 4983:4983
environment:
DATABASE_URL: postgresql://postgres:local@db:5432/postgres
restart: always
command: drizzle-kit studio
When I run docker-compose, I get the following log:
ecominate-drizzle-studio-1 | Drizzle Studio is up and running on https://local.drizzle.studio
yet when i visit the browser, it says its "Connecting to the Drizzle Kit on localhost:4983" are there separate docker instructions for how to run this?
9 Replies
jakeleventhal
jakeleventhalOP11mo ago
bump
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b39862f9d63c drizzle-studio "docker-entrypoint.s…" 4 minutes ago Up 57 seconds 0.0.0.0:4983->4983/tcp drizzle-studio-1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b39862f9d63c drizzle-studio "docker-entrypoint.s…" 4 minutes ago Up 57 seconds 0.0.0.0:4983->4983/tcp drizzle-studio-1
it shows the port is exposed I was able to get this to work, but i think its a bug will post link
jakeleventhal
jakeleventhalOP11mo ago
GitHub
Issue when running drizzle-kit studio out of docker · Issue #286 · ...
In docker, I specify the host as --host=0.0.0.0 and it says i can access the studio at https://local.drizzle.studio?host=0.0.0.0; however, when 4983 is exposed, the only way to access the studio is...
Furki4_4
Furki4_49mo ago
Hi @jakeleventhal I'm having a similar problem, have you found a solution? I'm running a node container for Next.js application and a postgres server. Since I boot drizzle studio inside the web container, I thought porting 4983:4983 would solve it but didn't work.
version: "3.8"
services:
web:
build: .
volumes:
- .:/app
- /app/node_modules
links:
- db
environment:
- DATABASE_URL=postgresql://postgres:furkicik@db:5432/turkish_dictionary
ports:
- "3000:3000"
- "4983:4983"
db:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=furkicik
- POSTGRES_DB=turkish_dictionary
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data

volumes:
db-data:
version: "3.8"
services:
web:
build: .
volumes:
- .:/app
- /app/node_modules
links:
- db
environment:
- DATABASE_URL=postgresql://postgres:furkicik@db:5432/turkish_dictionary
ports:
- "3000:3000"
- "4983:4983"
db:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=furkicik
- POSTGRES_DB=turkish_dictionary
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data

volumes:
db-data:
Furki4_4
Furki4_49mo ago
here it is...
No description
Furki4_4
Furki4_49mo ago
@Angelelz may you help us?
jakeleventhal
jakeleventhalOP9mo ago
i explain in the GH issue
Angelelz
Angelelz9mo ago
My apologies, I don't know drizzle studio enough to be of help on this
Furki4_4
Furki4_49mo ago
alright, thank you for responding :HYPERSL: if possible, can you please tag someone who may help us?
Angelelz
Angelelz9mo ago
Maybe @alexblokh
Want results from more Discord servers?
Add your server