File tree Expand file tree Collapse file tree 4 files changed +64
-51
lines changed Expand file tree Collapse file tree 4 files changed +64
-51
lines changed Original file line number Diff line number Diff line change 1
- FROM node:20 -bookworm-slim as base
1
+ FROM node:24 -bookworm-slim as base
2
2
3
3
RUN apt-get update && apt-get install -y git
4
4
5
+ ENV EPICSHOP_GITHUB_REPO=https://github.com/epicweb-dev/advanced-react-patterns
5
6
ENV EPICSHOP_CONTEXT_CWD="/myapp/workshop-content"
6
7
ENV EPICSHOP_DEPLOYED="true"
7
8
ENV EPICSHOP_DISABLE_WATCHER="true"
@@ -11,11 +12,15 @@ ENV NODE_ENV="production"
11
12
12
13
WORKDIR /myapp
13
14
15
+ # Clone the workshop repo during build time, excluding database files
16
+ RUN git clone --depth 1 ${EPICSHOP_GITHUB_REPO} ${EPICSHOP_CONTEXT_CWD}
17
+
14
18
ADD . .
15
19
16
20
RUN npm install --omit=dev
17
21
18
- CMD rm -rf ${EPICSHOP_CONTEXT_CWD} && \
19
- git clone https://github.com/epicweb-dev/advanced-react-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} && \
21
26
npx epicshop start
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
2
+ #
3
+
4
+ app : ' epicweb-dev-advanced-react-patterns'
5
+ primary_region : sjc
6
+ kill_signal : SIGINT
7
+ kill_timeout : 5s
8
+ swap_size_mb : 512
9
+
10
+ experimental :
11
+ auto_rollback : true
12
+
13
+ attached :
14
+ secrets : {}
15
+
16
+ services :
17
+ - processes :
18
+ - app
19
+ protocol : tcp
20
+ internal_port : 8080
21
+
22
+ ports :
23
+ - port : 80
24
+
25
+ handlers :
26
+ - http
27
+ force_https : true
28
+ - port : 443
29
+
30
+ handlers :
31
+ - tls
32
+ - http
33
+
34
+ concurrency :
35
+ type : connections
36
+ hard_limit : 100
37
+ soft_limit : 80
38
+
39
+ tcp_checks :
40
+ - interval : 15s
41
+ timeout : 2s
42
+ grace_period : 1s
43
+
44
+ http_checks :
45
+ - interval : 10s
46
+ timeout : 2s
47
+ grace_period : 5s
48
+ method : get
49
+ path : /resources/healthcheck
50
+ protocol : http
51
+ tls_skip_verify : false
Original file line number Diff line number Diff line change 1
1
import path from 'node:path'
2
+ import { warm } from '@epic-web/workshop-cli/warm'
2
3
import {
3
4
getApps ,
4
5
isProblemApp ,
5
6
setPlayground ,
6
7
} from '@epic-web/workshop-utils/apps.server'
7
8
import fsExtra from 'fs-extra'
8
9
10
+ await warm ( )
11
+
9
12
const allApps = await getApps ( )
10
13
const problemApps = allApps . filter ( isProblemApp )
11
14
@@ -22,7 +25,7 @@ if (!process.env.SKIP_PLAYGROUND) {
22
25
( ) => {
23
26
console . log ( '✅ first problem app set up' )
24
27
} ,
25
- error => {
28
+ ( error ) => {
26
29
console . error ( error )
27
30
throw new Error ( '❌ first problem app setup failed' )
28
31
} ,
You can’t perform that action at this time.
0 commit comments