Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ COPY ./todos.js todos.js
COPY ./cron.js cron.js


EXPOSE 1337
EXPOSE 80
ENTRYPOINT [ "node", "server" ]
16 changes: 10 additions & 6 deletions kustom-webapp/base/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ kind: Ingress
metadata:
name: my-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: teste.com
http:
paths:
- path: /prod
- paths:
- path: /prod/(.*)
pathType: Prefix
backend:
service:
name: app-service
port:
name: tester
- path: /dev
- path: /dev/(.*)
pathType: Prefix
backend:
service:
name: app-service
port:
name: tester
resource.customizations: |
extensions/Ingress:
health.lua: |
hs = {}
hs.status = "Healthy"
return hs
2 changes: 1 addition & 1 deletion kustom-webapp/base/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: app-service
spec:
selector:
app: my-app
app: app-service
container-name: tester
ports:
- protocol: TCP
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const routes = require("./routes");
const app = express();

// Set port
const port = "1337";
const port = "80";
app.set("port", port);

app.use('/', routes);
Expand Down