0
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?

More than 1 year has passed since last update.

Nuxt3 + TailwindCSS + Docker 本番環境向け

Last updated at Posted at 2023-09-12

Dockerfile

Nuxt3TainwindCSSを組み込み
SSR(Server Side Rendering)にてDokcerのコンテナを作成するDockerfileです
※Nuxt3はYarnを選択しました

FROM node:current-alpine as base

FROM base as builder
COPY . /app
WORKDIR /app

RUN yarn install && yarn build
RUN npx nuxi build

FROM base as runner

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

EXPOSE 3000
CMD [ "node", "./server/index.mjs" ]

本番環境向けと書いてますが、本番で運用する場合、前にnginxなどを挟んでください

0
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
0
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?