forked from bsurc/hpc-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.6 KB
/
docker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.6 KB
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
50
51
52
53
54
55
56
57
58
services:
dev:
build: .
image: hpc-intro-jekyll
working_dir: /work
volumes:
- .:/work
- ./.bundle:/work/vendor/bundle # cache gems for faster subsequent runs
environment:
# You MUST set this (see README in the repo)
# e.g. HPC_JEKYLL_CONFIG=_includes/snippets_library/YourInst_YourCluster_Slurm/_config_options.yml
HPC_JEKYLL_CONFIG: ${HPC_JEKYLL_CONFIG}
JEKYLL_ENV: development
ports:
- "4000:4000"
- "35729:35729"
command: serve
build:
build: .
image: hpc-intro-jekyll
working_dir: /work
volumes:
- .:/work
- ./.bundle:/work/vendor/bundle
environment:
HPC_JEKYLL_CONFIG: ${HPC_JEKYLL_CONFIG}
JEKYLL_ENV: production
command: build
pr-check:
build: .
image: hpc-intro-jekyll
environment:
REPO_URL: https://github.com/bsurc/hpc-intro.git
# Run with: PR=123 docker compose run --rm pr-check
PR: ${PR}
HPC_JEKYLL_CONFIG: ${HPC_JEKYLL_CONFIG}
volumes:
- ./.pr_builds:/output # built PR sites land here: ./.pr_builds/pr-<num>
- ./.bundle-pr:/work/vendor/bundle # separate cache for PR builds
command: pr
pr-serve:
build: .
image: hpc-intro-jekyll
environment:
REPO_URL: https://github.com/bsurc/hpc-intro.git
PR: ${PR}
HPC_JEKYLL_CONFIG: ${HPC_JEKYLL_CONFIG}
PORT: ${PORT:-4000}
LR_PORT: ${LR_PORT:-35729}
# publish whatever PORT/LR_PORT you choose at runtime
ports:
- "${PORT:-4000}:${PORT:-4000}"
- "${LR_PORT:-35729}:${LR_PORT:-35729}"
command: pr-serve