File tree Expand file tree Collapse file tree 4 files changed +64
-50
lines changed Expand file tree Collapse file tree 4 files changed +64
-50
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_REPO=https://github.com/epicweb-dev/data-modeling
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,16 @@ 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_REPO} ${EPICSHOP_CONTEXT_CWD}
17
+ find ${EPICSHOP_CONTEXT_CWD} -name "data.db" -delete
18
+
14
19
ADD . .
15
20
16
21
RUN npm install --omit=dev
17
22
18
- CMD rm -rf ${EPICSHOP_CONTEXT_CWD} && \
19
- git clone https://github.com/epicweb-dev/data-modeling ${EPICSHOP_CONTEXT_CWD} && \
20
- cd ${EPICSHOP_CONTEXT_CWD} && \
23
+ RUN cd ${EPICSHOP_CONTEXT_CWD} && \
24
+ npx epicshop warm
25
+
26
+ CMD cd ${EPICSHOP_CONTEXT_CWD} && \
21
27
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-data-modeling'
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 @@ -3,12 +3,15 @@ import path from 'node:path'
3
3
import { spawn } from 'child_process'
4
4
import fsExtra from 'fs-extra'
5
5
import { $ } from 'execa'
6
+ import { warm } from '@epic-web/workshop-cli/warm'
6
7
import {
7
8
getApps ,
8
9
isProblemApp ,
9
10
setPlayground ,
10
11
} from '@epic-web/workshop-utils/apps.server'
11
12
13
+ await warm ( )
14
+
12
15
const allApps = await getApps ( )
13
16
const problemApps = allApps . filter ( isProblemApp )
14
17
You can’t perform that action at this time.
0 commit comments