diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-27 19:02:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-27 19:02:32 +0900 |
| commit | 7cbf34204233df7c7e9e4b24998e25dbd8d2a423 (patch) | |
| tree | 848da44374c48edec603fb014c59ad0fbb9307e6 /frontend | |
| parent | 18308a22879dc9143a03bcbe53cf0c5e8e49ee1f (diff) | |
| download | phperkaigi-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.tar.gz phperkaigi-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.tar.zst phperkaigi-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.zip | |
organize dockerfiles and compose.yaml
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/.dockerignore | 3 | ||||
| -rw-r--r-- | frontend/Dockerfile | 28 |
2 files changed, 31 insertions, 0 deletions
diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..9cabb19 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,3 @@ +/node_modules +/.cache +/build diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..974725e --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,28 @@ +ARG ALBATROSS_HOST + +FROM node:20.14.0 AS builder + +WORKDIR /app +ENV NODE_ENV=production + +COPY package.json package-lock.json . +RUN npm install --include=dev + +COPY . . +RUN npm run build + +################################################################################ +FROM node:20.14.0 + +WORKDIR /app +ENV NODE_ENV=production + +COPY package.json package-lock.json . +RUN npm install --omit=dev + +COPY --from=builder /app/build ./build + +ENV HOST="$ALBATROSS_HOST" +ENV PORT=80 +EXPOSE 80 +CMD ["npm", "run", "start"] |
