Skip to content

Commit da97b5f

Browse files
committed
Update Jekyll Pod configuration for improved SELinux handling and port assignment
1 parent 91f3161 commit da97b5f

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

dev-environment.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
# This manifest defines:
2-
# - A PersistentVolumeClaim for shared storage between containers and vscode (or another IDE icoul)
3-
# - A Pod running Jekyll, mounting the shared storage
2+
# - A Pod running Jekyll
3+
# - A bind-mounted volume from the host system for sharing content with the container
4+
# - SELinux relabeling to ensure Podman can access the bind mount securely
45

5-
# Jekyll Pod
66
apiVersion: v1
77
kind: Pod
88
metadata:
99
name: jekyll
10+
annotations:
11+
# This annotation is required by Podman to apply SELinux relabeling to the bind mount path.
12+
# It ensures the container can access the host directory securely under SELinux policies.
13+
# IMPORTANT: Update this path if you clone this repo and use a different local directory.
14+
io.containers.selinux.mount: "/home/jmk/Repositories/spectral-jekyll-theme"
1015
spec:
1116
volumes:
12-
- name: jekyll-shared
17+
- name: jekyll-shared-spectral
1318
hostPath:
1419
path: /home/jmk/Repositories/spectral-jekyll-theme
1520
type: Directory
16-
selinuxRelabel: "shared"
21+
# This tells Podman to apply a shared SELinux label to the directory.
22+
# Use "shared" if multiple containers need access to the same label.
23+
# Use "private" if you want isolation.
24+
selinuxRelabel: "private"
1725
containers:
1826
- name: jekyll
1927
image: ghcr.io/bretfisher/jekyll-serve:latest
2028
ports:
2129
- containerPort: 4000
2230
hostPort: 4000
31+
# NOTE: If running multiple Jekyll pods, make sure each uses a unique hostPort
32+
# to avoid conflicts (e.g., 4001, 4002, etc.)
2333
volumeMounts:
2434
- mountPath: /site
25-
name: jekyll-shared
35+
name: jekyll-shared-spectral
36+
# This mounts the host directory into the container at /site
37+
# Jekyll will serve content from this path

0 commit comments

Comments
 (0)