Compare commits
3 Commits
1f9ee3ce9e
...
k8s
| Author | SHA1 | Date | |
|---|---|---|---|
|
413839b58b
|
|||
|
645ec05164
|
|||
|
64922f2dc2
|
@@ -1,6 +1,6 @@
|
|||||||
.PHONY: setup-tls
|
.PHONY: setup-tls
|
||||||
|
|
||||||
DOMAIN ::= website.com
|
DOMAIN = website.com
|
||||||
|
|
||||||
setup-tls: tls/cert.pem
|
setup-tls: tls/cert.pem
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,19 @@ $ # ^ do that when you make changes to config
|
|||||||
|
|
||||||
# what if sth doesn't work?
|
# what if sth doesn't work?
|
||||||
|
|
||||||
|
## using podman?
|
||||||
|
give the nginx (sub)user access to the tls directory
|
||||||
|
```console
|
||||||
|
$ podman unshare setfacl -Rmu:101:rX tls/
|
||||||
|
```
|
||||||
|
|
||||||
|
## using docker?
|
||||||
might be the `:z` label in the `volumes` in `docker-compose.yml`. remove it.
|
might be the `:z` label in the `volumes` in `docker-compose.yml`. remove it.
|
||||||
e.g.
|
e.g.
|
||||||
```
|
```
|
||||||
- ./tls:/etc/nginx/tls:ro
|
- ./tls:/etc/nginx/tls:ro
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## using macOS?
|
||||||
|
make is angry with you? you're on your own for this one. just read the commands and run them directly
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# Save the output of this file and use kubectl create -f to import
|
||||||
|
# it into Kubernetes.
|
||||||
|
#
|
||||||
|
# Created with podman-5.8.4
|
||||||
|
|
||||||
|
# NOTE: If you generated this yaml from an unprivileged and rootless podman container on an SELinux
|
||||||
|
# enabled system, check the podman generate kube man page for steps to follow to ensure that your pod/container
|
||||||
|
# has the right permissions to access the volumes added.
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
bind-mount-options: /home/kevinnlsamuel/project/cookies/www:z
|
||||||
|
creationTimestamp: "2026-09-02T17:51:20Z"
|
||||||
|
labels:
|
||||||
|
app: cookies-pod
|
||||||
|
name: cookies-pod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- nginx
|
||||||
|
- -g
|
||||||
|
- daemon off;
|
||||||
|
env:
|
||||||
|
- name: TERM
|
||||||
|
value: xterm
|
||||||
|
image: docker.io/library/nginx:alpine
|
||||||
|
name: cookies
|
||||||
|
ports:
|
||||||
|
- containerPort: 443
|
||||||
|
hostPort: 8443
|
||||||
|
tty: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/nginx/tls
|
||||||
|
name: home-kevinnlsamuel-project-cookies-tls-host-0
|
||||||
|
readOnly: true
|
||||||
|
- mountPath: /etc/nginx/conf.d
|
||||||
|
name: home-kevinnlsamuel-project-cookies-conf.d-host-1
|
||||||
|
readOnly: true
|
||||||
|
- mountPath: /srv/www
|
||||||
|
name: home-kevinnlsamuel-project-cookies-www-host-2
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- hostPath:
|
||||||
|
path: /home/kevinnlsamuel/project/cookies/tls
|
||||||
|
type: Directory
|
||||||
|
name: home-kevinnlsamuel-project-cookies-tls-host-0
|
||||||
|
- hostPath:
|
||||||
|
path: /home/kevinnlsamuel/project/cookies/conf.d
|
||||||
|
type: Directory
|
||||||
|
name: home-kevinnlsamuel-project-cookies-conf.d-host-1
|
||||||
|
- hostPath:
|
||||||
|
path: /home/kevinnlsamuel/project/cookies/www
|
||||||
|
type: Directory
|
||||||
|
name: home-kevinnlsamuel-project-cookies-www-host-2
|
||||||
|
|
||||||
+1
-1
@@ -5,6 +5,6 @@ services:
|
|||||||
- ./conf.d/:/etc/nginx/conf.d:ro,z
|
- ./conf.d/:/etc/nginx/conf.d:ro,z
|
||||||
- ./tls:/etc/nginx/tls:ro,z
|
- ./tls:/etc/nginx/tls:ro,z
|
||||||
- ./www:/srv/www:ro,z
|
- ./www:/srv/www:ro,z
|
||||||
publish:
|
ports:
|
||||||
- 8443:443
|
- 8443:443
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user