Test
This commit is contained in:
commit
49fc7d42ab
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM node:23.6-bullseye-slim
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install curl -y
|
||||||
|
|
||||||
|
WORKDIR /opt/prod/app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD [ "node", "dist/start.js" ]
|
||||||
13
compose.yaml
Normal file
13
compose.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
http-server:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- CMD
|
||||||
|
- curl
|
||||||
|
- 'http://127.0.0.1:3000/test'
|
||||||
|
interval: 2s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 15
|
||||||
9
dist/start.js
vendored
Normal file
9
dist/start.js
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const express = require("express");
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
app.get("/test", async function (req, res) {
|
||||||
|
res.send(`Testing ${new Date().toLocaleTimeString()}<br><pre>${JSON.stringify(req)}</pre>`)
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(3000);
|
||||||
8
package.json
Normal file
8
package.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "localtest.jdf2.org",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.17.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user