1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Docker環境でPrisma Studioが開けない問題

Posted at

問題点

Docker環境のNuxt3にPrismaをインストールしたが、「このサイトサイトにアクセスできません。」というエラーが発生し、Prisma Studioをローカル環境で開きませんでした。

Docker環境

Dockerfile

FROM node:18-slim

ENV TZ Asia/Tokyo

WORKDIR /app

RUN apt-get update \
    && apt-get install -y \
    git \
    vim

docker-compose.yml

version: "3.9"

services:
  nuxt:
    container_name: nuxt
    build: docker/nuxt
    volumes:
      - ./front:/app:cached
      - nuxt_node_modules:/app/node_modules
    ports:
      - "80:3000"
      - "24678:24678"
    tty: true
    environment:
      - HOST=0.0.0.0
      - port=80
      - CHOKIDAR_USEPOLLING=true
    # 初期構築段階ではコメントアウトする
    command: sh -c "yarn && yarn dev"
volumes:
  nuxt_node_modules:

解決

docker-compose.ymlの以下の部分を追加することで、Prisma Studioを開きました。

ports:
 - "80:3000"
 - "24678:24678"
+- "5555:5555"

参考資料

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?