Browse Source

Use serve instead

main
Luke Murphy 1 year ago
parent
commit
cb3660fdd1
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 12
      Dockerfile
  2. 4
      compose.yml
  3. 2
      package.json

12
Dockerfile

@ -1,13 +1,11 @@
FROM node:alpine
EXPOSE 8081
EXPOSE 5000
COPY ./docs /app
RUN npm i -g serve
WORKDIR /app
RUN apk add --no-cache curl
COPY . /app
RUN npm install http-server
WORKDIR /app
CMD ["npm", "start"]
CMD ["npm", "run", "start"]

4
compose.yml

@ -5,7 +5,7 @@ services:
app:
image: "decentral1se/biobulkbende.org:latest"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081"]
test: ["CMD", "curl", "-f", "http://localhost:5000"]
interval: 10s
timeout: 10s
retries: 10
@ -18,7 +18,7 @@ services:
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.biobulkbende-org.loadbalancer.server.port=8081"
- "traefik.http.services.biobulkbende-org.loadbalancer.server.port=5000"
- "traefik.http.routers.biobulkbende-org.rule=Host(`biobulkbende.org`)"
- "traefik.http.routers.biobulkbende-org.entrypoints=web-secure"
- "traefik.http.routers.biobulkbende-org.tls.certresolver=production"

2
package.json

@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "http-server -c-1 docs/ -p 8081"
"start": "serve docs"
},
"author": "",
"license": "ISC",

Loading…
Cancel
Save