mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-06 23:09:08 +00:00
Updating Dockerfile for multistage build based on feedbacks
This commit is contained in:
@@ -11,8 +11,13 @@
|
|||||||
|
|
||||||
# Ignore git and cache folders
|
# Ignore git and cache folders
|
||||||
.git
|
.git
|
||||||
|
.gitignore
|
||||||
.cache
|
.cache
|
||||||
|
|
||||||
|
# Ignore build folders
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
|
||||||
# Ignore default volumes created by running docker compose up
|
# Ignore default volumes created by running docker compose up
|
||||||
ontime-db
|
ontime-db
|
||||||
ontime-styles
|
ontime-styles
|
||||||
|
|||||||
+10
-8
@@ -1,11 +1,13 @@
|
|||||||
FROM node:18.18-alpine as builder
|
FROM node:18.18-alpine AS base
|
||||||
ENV NODE_ENV=docker
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV ONTIME_DATA=/external/
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
WORKDIR /app/
|
RUN corepack enable
|
||||||
RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh -
|
|
||||||
COPY . /app/
|
FROM base AS builder
|
||||||
RUN PNPM_HOME="/root/.local/share/pnpm" PATH="${PATH}:/root/.local/share/pnpm" pnpm i
|
COPY . /app
|
||||||
run PNPM_HOME="/root/.local/share/pnpm" PATH="${PATH}:/root/.local/share/pnpm" pnpm run build:localdocker
|
WORKDIR /app
|
||||||
|
RUN pnpm install --frozen-lockfile \
|
||||||
|
&& pnpm turbo build:docker
|
||||||
|
|
||||||
FROM node:18.18-alpine
|
FROM node:18.18-alpine
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user