Skip to content

Commit

Permalink
Merge pull request #38 from danesjenovdan/consul
Browse files Browse the repository at this point in the history
update k8s consul
  • Loading branch information
LepkoQQ authored Sep 10, 2024
2 parents a57226e + 7a5334d commit 2b50f9b
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 72 deletions.
5 changes: 4 additions & 1 deletion consul/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# build stage image
# ---
FROM node:14-alpine as build
FROM node:20-alpine AS build
RUN apk add --update --no-cache git

# set current directory
Expand All @@ -22,3 +22,6 @@ FROM nginx:alpine

# copy built files from the 'build' container into the nginx container
COPY --from=build /app/dist /usr/share/nginx/html

# copy custom nginx config to support routes without .html
COPY nginx.conf /etc/nginx/conf.d/default.conf
2 changes: 1 addition & 1 deletion consul/locales/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"nav-process": "Z vami smo v vseh fazah procesa",
"process-1": "SVETOVANJE",
"process-1-alt": "slika svetovanje",
"process-1-desc": "Naši strokovnjaki vam bodo pomagali pri razmisleku o načinu izvedbe participativnega proračuna in svetovali o pravnih okvirjih ter najboljših možnostih za vaše potrebe.",
"process-1-desc": "Naši strokovnjaki vam bodo pomagali pri razmisleku o načinu izvedbe participativnega proračuna ter svetovali o pravnih okvirih in najboljših rešitvah za vaše potrebe.",
"process-2": "RAZVOJ",
"process-2-alt": "slika razvoj",
"process-2-desc": "Naša razvijalska ekipa bo na podlagi vaših želja hitro prilagodila in postavila testno okolje ter nastavila vse potrebno za izvedbo vašega participativnega proračuna.",
Expand Down
9 changes: 9 additions & 0 deletions consul/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri.html $uri/ =404;
}
}
2 changes: 1 addition & 1 deletion consul/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h2 class="text-center" data-aos="fade-up">
<h3 data-t="process-1">SVETOVANJE</h3>
<hr>
<p data-t="process-1-desc">
Naši strokovnjaki vam bodo pomagali pri razmisleku o načinu izvedbe participativnega proračuna in svetovali o pravnih okvirjih ter najboljših možnosti za vaše potrebe.
Naši strokovnjaki vam bodo pomagali pri razmisleku o načinu izvedbe participativnega proračuna ter svetovali o pravnih okvirih in najboljših rešitvah za vaše potrebe.
</p>
</div>
</div>
Expand Down
21 changes: 21 additions & 0 deletions kustomize/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: consul-landing
labels:
app: consul-landing
spec:
replicas: 1
selector:
matchLabels:
app: consul-landing
template:
metadata:
labels:
app: consul-landing
spec:
containers:
- name: consul-landing
image: consul-landing
ports:
- containerPort: 80
68 changes: 0 additions & 68 deletions kustomize/frontend.yaml

This file was deleted.

34 changes: 34 additions & 0 deletions kustomize/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: consul-landing
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-production"
spec:
ingressClassName: nginx
tls:
- hosts:
- consul.djnd.si
- consul.danesjenovdan.si
secretName: consul-landing-tls
rules:
- host: consul.djnd.si
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: consul-landing
port:
number: 80
- host: consul.danesjenovdan.si
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: consul-landing
port:
number: 80
4 changes: 3 additions & 1 deletion kustomize/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: consul-landing
resources:
- frontend.yaml
- deployment.yaml
- ingress.yaml
- service.yaml
images:
- name: consul-landing
newName: rg.fr-par.scw.cloud/djnd/consul-landing
Expand Down
11 changes: 11 additions & 0 deletions kustomize/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: consul-landing
spec:
selector:
app: consul-landing
ports:
- protocol: TCP
port: 80
targetPort: 80

0 comments on commit 2b50f9b

Please sign in to comment.