Skip to content

Commit

Permalink
feat: remove svelte and use an easy express app
Browse files Browse the repository at this point in the history
  • Loading branch information
irony committed Sep 20, 2024
1 parent 19fed2b commit 974781f
Show file tree
Hide file tree
Showing 13 changed files with 2,726 additions and 5,979 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
.env
.env.*
!.env.example
.aider*
11 changes: 4 additions & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true
}
17 changes: 4 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
FROM node:16 AS builder
FROM node:22

WORKDIR /build
WORKDIR /app

ADD package.json .
ADD package-lock.json .

RUN npm ci
ADD . .

ADD src ./src
ADD static ./static
ADD svelte.config.js .
ADD vite.config.ts .

RUN npm run build

FROM nginx AS runner

WORKDIR /usr/share/nginx/html
COPY --from=builder /build/build .
CMD npm start
59 changes: 59 additions & 0 deletions k8s/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: v1
kind: Service
metadata:
name: mail-signature
labels:
app: mail-signature
spec:
ports:
- port: 3000
protocol: TCP
clusterIP: None
selector:
app: mail-signature
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mail-signature
labels:
app: mail-signature
spec:
replicas: 1
selector:
matchLabels:
app: mail-signature
template:
metadata:
labels:
app: mail-signature
spec:
containers:
- name: mail-signature
image: mail-signature
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mail-signature
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
labels:
name: mail-signature
spec:
rules:
- host: signature.iteam.services
tls:
- hosts:
- signature.iteam.services
secretName: iteam-services-tls
http:
paths:
- pathType: Prefix
path: '/'
backend:
service:
name: mail-signature
port:
number: 3000
Loading

0 comments on commit 974781f

Please sign in to comment.