add internal nginx config
This commit is contained in:
@@ -79,7 +79,6 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
# Default k3s port?
|
|
||||||
proxyPass = "http://127.0.0.1:30080";
|
proxyPass = "http://127.0.0.1:30080";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|||||||
@@ -25,7 +25,15 @@ spec:
|
|||||||
- name: static-files
|
- name: static-files
|
||||||
mountPath: /var/nimh-static/site
|
mountPath: /var/nimh-static/site
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
|
- name: nginx-config
|
||||||
|
mountPath: /etc/nginx/conf.d/default.conf
|
||||||
|
subPath: default.conf
|
||||||
volumes:
|
volumes:
|
||||||
- name: static-files
|
- name: static-files
|
||||||
configMap:
|
configMap:
|
||||||
name: nimh-static-files
|
name: nimh-static-files
|
||||||
|
|
||||||
|
- name: nginx-config
|
||||||
|
configMap:
|
||||||
|
name: nimh-static-nginx
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ resources:
|
|||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
- nginx.yaml
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nimh-static-nginx
|
||||||
|
|
||||||
|
data:
|
||||||
|
default.conf: |
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
root /var/nimh-static/site;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
meta,
|
meta,
|
||||||
...
|
...
|
||||||
@@ -42,12 +41,6 @@
|
|||||||
group = "acme";
|
group = "acme";
|
||||||
};
|
};
|
||||||
|
|
||||||
"minio-credentials" = {
|
|
||||||
sopsFile = ./secrets/minio.yaml;
|
|
||||||
key = "minioCredentials";
|
|
||||||
format = "yaml";
|
|
||||||
};
|
|
||||||
|
|
||||||
"postgresql-credentials" = {
|
"postgresql-credentials" = {
|
||||||
sopsFile = ./secrets/psql.yaml;
|
sopsFile = ./secrets/psql.yaml;
|
||||||
key = "credentials";
|
key = "credentials";
|
||||||
@@ -78,6 +71,7 @@
|
|||||||
CF_API_KEY_FILE = config.sops.secrets."cloudflare-api-key".path;
|
CF_API_KEY_FILE = config.sops.secrets."cloudflare-api-key".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
certs = {
|
certs = {
|
||||||
"roypository.com" = {
|
"roypository.com" = {
|
||||||
domain = "*.roypository.com";
|
domain = "*.roypository.com";
|
||||||
|
|||||||
Reference in New Issue
Block a user