Skip to content

Commit f055545

Browse files
authored
Add an API for active job posts (#427)
* Expose http ingress in k8s * Update tsconfig target & module * Webserver deps * Use node 22 * Modernized or whatever * Dummy server * Serve stored messages from API
1 parent 6a6fb79 commit f055545

File tree

11 files changed

+1389
-36
lines changed

11 files changed

+1389
-36
lines changed

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
22
root: true,
33
parser: "@typescript-eslint/parser",
4+
parserOptions: { sourceType: "module" },
45
plugins: ["@typescript-eslint"],
56
extends: [
67
"eslint:recommended",

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# TODO: see if we need to do anything special to cache docker images
2121
- uses: actions/setup-node@v3
2222
with:
23-
node-version: 20
23+
node-version: 22
2424
cache: npm
2525

2626
- name: Login to GitHub Container Registry

cluster/ingress.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: reactibot-ingress
5+
annotations:
6+
nginx.ingress.kubernetes.io/rewrite-target: /
7+
cert-manager.io/cluster-issuer: letsencrypt-prod # Optional, for TLS
8+
spec:
9+
rules:
10+
- host: api.reactiflux.com
11+
http:
12+
paths:
13+
- path: /
14+
pathType: Prefix
15+
backend:
16+
service:
17+
name: reactibot
18+
port:
19+
number: 80
20+
tls:
21+
- hosts:
22+
- api.reactiflux.com
23+
secretName: my-tls-secret # Used for HTTPS

cluster/service.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: reactibot-service
5+
labels:
6+
app: reactibot
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- port: 80 # External port
11+
targetPort: 3000 # Port the pod exposes
12+
selector:
13+
app: reactibot

kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ namespace: default
44
commonLabels:
55
app: reactibot
66
resources:
7+
- cluster/service.yaml
78
- cluster/deployment.yaml
9+
- cluster/ingress.yaml
810

911
configMapGenerator:
1012
- name: k8s-context # this is an internal name

0 commit comments

Comments
 (0)