Spaces:
Running
Running
thibaud frere
commited on
Commit
·
c7b266f
1
Parent(s):
fc17cea
update
Browse files
Dockerfile
CHANGED
@@ -14,8 +14,15 @@ RUN npm install
|
|
14 |
# Copy the rest of the application code
|
15 |
COPY app/ .
|
16 |
|
17 |
-
#
|
18 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
# Build the application
|
21 |
RUN npm run build
|
|
|
14 |
# Copy the rest of the application code
|
15 |
COPY app/ .
|
16 |
|
17 |
+
# Ensure `public/data` is a real directory with real files (not a symlink)
|
18 |
+
# This handles the case where `public/data` is a symlink in the repo, which
|
19 |
+
# would be broken inside the container after COPY.
|
20 |
+
RUN set -e; \
|
21 |
+
if [ -e public ] && [ ! -d public ]; then rm -f public; fi; \
|
22 |
+
mkdir -p public; \
|
23 |
+
if [ -L public/data ] || { [ -e public/data ] && [ ! -d public/data ]; }; then rm -f public/data; fi; \
|
24 |
+
mkdir -p public/data; \
|
25 |
+
cp -a src/content/assets/data/. public/data/
|
26 |
|
27 |
# Build the application
|
28 |
RUN npm run build
|
app/src/content/chapters/getting-started.mdx
CHANGED
@@ -28,9 +28,10 @@ npm run dev
|
|
28 |
```bash
|
29 |
npm run build
|
30 |
```
|
31 |
-
<small className="muted"
|
32 |
-
<br
|
33 |
-
A [slug-title].pdf and thumb.jpg are also generated at build time. You can find them in the public folder
|
|
|
34 |
|
35 |
### Deploy
|
36 |
|
|
|
28 |
```bash
|
29 |
npm run build
|
30 |
```
|
31 |
+
<small className="muted">- Serving the `dist/` directory on any static host is enough to deliver the site.</small>
|
32 |
+
<br/>
|
33 |
+
<small className="muted">- A [slug-title].pdf and thumb.jpg are also generated at build time. You can find them in the public folder.</small>
|
34 |
+
|
35 |
|
36 |
### Deploy
|
37 |
|