-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from garden-io/hot-reload
Hot-reload functionality for local k8s
- Loading branch information
Showing
74 changed files
with
7,597 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
kubernetes: | ||
username: hello | ||
previous-usernames: | ||
- hello | ||
linkedModuleSources: [] | ||
linkedProjectSources: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
project: | ||
name: hot-reload | ||
environmentDefaults: | ||
providers: | ||
- name: container | ||
environments: | ||
- name: local | ||
providers: | ||
- name: local-kubernetes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
Dockerfile | ||
garden.yml | ||
app.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:9-alpine | ||
|
||
ENV PORT=8080 | ||
EXPOSE ${PORT} | ||
|
||
ADD . /app | ||
WORKDIR /app | ||
|
||
RUN npm install -g nodemon | ||
RUN npm install | ||
|
||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const express = require("express") | ||
|
||
const app = express() | ||
|
||
app.get("/hello", (req, res) => { | ||
res.json({message: "Hello from Node!"}) | ||
}) | ||
|
||
// This is the path GAE uses for health checks | ||
app.get("/_ah/health", (req, res) => { | ||
res.sendStatus(200) | ||
}) | ||
|
||
module.exports = { app } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module: | ||
description: Node greeting service | ||
name: node-service | ||
type: container | ||
hotReload: | ||
sync: | ||
- target: /app/ | ||
services: | ||
- name: node-service | ||
command: [npm, start] | ||
hotReloadCommand: [npm, run, dev] | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
ingresses: | ||
- path: /hello | ||
port: http | ||
healthCheck: | ||
httpGet: | ||
path: /_ah/health | ||
port: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { app } = require("./app") | ||
|
||
app.listen(process.env.PORT, "0.0.0.0", () => console.log("App started")) |
Oops, something went wrong.