-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 1.23 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
x-slides-base: &slides-base
build:
context: ./
args:
BUILDKIT_INLINE_CACHE: 1
environment:
- PRESENTATION_URL=${PRESENTATION_URL}
- REPOSITORY_URL=${REPOSITORY_URL}
user: ${CURRENT_UID}
tmpfs:
- ${BUILD_DIR} # Faster gulp I/O operations
volumes:
- ./content:/app/content
- ./assets:/app/assets
- ${DIST_DIR}:/app/dist
- ./gulp/gulpfile.js:/app/gulpfile.js
- ./gulp/tasks:/app/tasks
- ./npm-packages:/app/npm-packages
services:
serve:
<<: *slides-base
ports:
- "8000:8000"
build:
<<: *slides-base
depends_on:
qrcode:
condition: service_completed_successfully # Must NOT run in parallel
entrypoint: >
sh -xc 'gulp build && cp -r "${BUILD_DIR}"/* /app/dist/'
qrcode:
<<: *slides-base
entrypoint: /app/node_modules/.bin/qrcode
command: >
-t png -o /app/content/media/qrcode.png ${PRESENTATION_URL}
pdf:
image: ghcr.io/astefanutti/decktape:3.7.0
depends_on:
build:
condition: service_completed_successfully # PDF is generated from the dist/index.html
user: ${CURRENT_UID}
volumes:
- ${DIST_DIR}:/slides
command: >
/slides/index.html /slides/slides.pdf --size='2048x1536' --pause 0