Skip to content

Commit 6252560

Browse files
committed
improve setup
1 parent 9ce2024 commit 6252560

File tree

3 files changed

+12
-50
lines changed

3 files changed

+12
-50
lines changed

epicshop/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM node:20-bookworm-slim as base
1+
FROM node:24-bookworm-slim as base
22

33
RUN apt-get update && apt-get install -y git
44

5+
ENV EPICSHOP_GITHUB_REPO=https://github.com/epicweb-dev/advanced-vitest-patterns
56
ENV EPICSHOP_CONTEXT_CWD="/myapp/workshop-content"
67
ENV EPICSHOP_DEPLOYED="true"
78
ENV EPICSHOP_DISABLE_WATCHER="true"
@@ -11,11 +12,15 @@ ENV NODE_ENV="production"
1112

1213
WORKDIR /myapp
1314

15+
# Clone the workshop repo during build time, excluding database files
16+
RUN git clone --depth 1 ${EPICSHOP_GITHUB_REPO} ${EPICSHOP_CONTEXT_CWD}
17+
1418
ADD . .
1519

1620
RUN npm install --omit=dev
1721

18-
CMD rm -rf ${EPICSHOP_CONTEXT_CWD} && \
19-
git clone https://github.com/epicweb-dev/advanced-vitest-patterns ${EPICSHOP_CONTEXT_CWD} && \
20-
cd ${EPICSHOP_CONTEXT_CWD} && \
22+
RUN cd ${EPICSHOP_CONTEXT_CWD} && \
23+
npx epicshop warm
24+
25+
CMD cd ${EPICSHOP_CONTEXT_CWD} && \
2126
npx epicshop start

epicshop/fly.toml

Lines changed: 0 additions & 46 deletions
This file was deleted.

epicshop/setup-custom.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import path from 'node:path'
2+
import { warm } from '@epic-web/workshop-cli/warm'
23
import {
34
getApps,
45
isProblemApp,
56
setPlayground,
67
} from '@epic-web/workshop-utils/apps.server'
78
import fsExtra from 'fs-extra'
89

10+
await warm()
11+
912
const allApps = await getApps()
1013
const problemApps = allApps.filter(isProblemApp)
1114

0 commit comments

Comments
 (0)