Skip to content

Commit c9c4831

Browse files
committed
Dockerfile updated for zxplay.org
1 parent c83a7c5 commit c9c4831

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

apps/play/Dockerfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
FROM caddy:2 AS base
2-
COPY Caddyfile /etc/caddy/Caddyfile
3-
4-
FROM node:19 AS npmbuild
5-
WORKDIR /project
6-
COPY . .
7-
RUN npm install --force
8-
RUN npm run build
9-
10-
FROM base AS final
11-
COPY --from=npmbuild /project/public /srv
12-
RUN sed -i "s|ver=0|"ver=`date +"%s"`"|g" /srv/index.html
1+
FROM caddy:2 AS base
2+
COPY apps/play/Caddyfile /etc/caddy/Caddyfile
3+
4+
FROM node:22 AS npmbuild
5+
WORKDIR /project
6+
# Build context is the repo root so the workspace + @zxplay/emulator are present.
7+
COPY . .
8+
RUN npm install --legacy-peer-deps
9+
# Builds @zxplay/emulator then apps/play (its build script chains both).
10+
RUN npm run build -w play
11+
12+
FROM base AS final
13+
COPY --from=npmbuild /project/apps/play/public /srv
14+
# Cache-bust the static bundle reference per build.
15+
RUN sed -i "s|ver=0|ver=$(date +%s)|g" /srv/index.html

0 commit comments

Comments
 (0)