@@ -74,3 +74,4 @@ trigger:
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- pull_request
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,18 +1,14 @@
|
||||
FROM node:18
|
||||
LABEL org.opencontainers.image.source https://github.com/KevinMidboe/figlet-http
|
||||
|
||||
RUN mkdir -p /opt/figlet-http/src
|
||||
RUN mkdir -p /opt/figlet-http/lib
|
||||
|
||||
WORKDIR /opt/figlet-http
|
||||
|
||||
COPY src/ src
|
||||
COPY tsconfig.json .
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
COPY lib/ lib
|
||||
|
||||
RUN yarn
|
||||
RUN yarn build
|
||||
RUN yarn install --production
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["yarn", "start"]
|
||||
CMD ["node", "lib/app.js"]
|
||||
|
||||
15
README.md
15
README.md
@@ -56,15 +56,26 @@ Api endpoints `/text` & `/motd` have the following query options:
|
||||
|
||||
## Docker install
|
||||
|
||||
Run as a docker container using:
|
||||
Run as a docker container from github container registry:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
sudo docker run -d \
|
||||
--name figlet-http \
|
||||
-p 3000:3000 \
|
||||
ghcr.io/kevinmidboe/figlet-http
|
||||
```
|
||||
|
||||
Run as docker locally:
|
||||
```bash
|
||||
yarn build; \
|
||||
sudo docker build -t figlet-http .; \
|
||||
sudo docker run -d \
|
||||
--name figlet-http \
|
||||
-p 3000:3000 \
|
||||
figlet-http
|
||||
```
|
||||
|
||||
|
||||
## Systemd service
|
||||
|
||||
Example systemd config for running http server.
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.18.2",
|
||||
"figlet": "^1.5.2",
|
||||
"typescript": "^4.8.4"
|
||||
"figlet": "^1.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.11.2",
|
||||
@@ -16,6 +15,7 @@
|
||||
"@typescript-eslint/parser": "^5.40.1",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-import": "^2.26.0"
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"typescript": "^4.8.4"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user