mirror of
https://github.com/key-networks/ztncui.git
synced 2025-07-28 11:22:51 +02:00
Remove tls and added Dockerfile
This commit is contained in:
parent
537a567e29
commit
412739e118
2 changed files with 21 additions and 2 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
FROM node:slim as base
|
||||||
|
COPY src /app/src
|
||||||
|
RUN apt update && apt install -yqq curl gnupg2 && curl install.zerotier.com | bash && cd /var/lib/zerotier-one/ && rm authtoken.secret planet zerotier-one.pid zerotier-one.port identity.secret identity.public
|
||||||
|
|
||||||
|
FROM base as dependencies
|
||||||
|
WORKDIR /app/src
|
||||||
|
RUN apt-get install -y build-essential python3 && npm install -g node-gyp && npm install
|
||||||
|
|
||||||
|
FROM base as runtime
|
||||||
|
COPY src /app/
|
||||||
|
COPY --from=dependencies /app/src/node_modules /app/src/node_modules
|
||||||
|
EXPOSE 3000
|
||||||
|
RUN mv /app/src/etc/default.passwd /app/src/etc/passwd
|
||||||
|
WORKDIR /app/src/
|
||||||
|
CMD zerotier-one -d && npm start
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# - remove cache and trash
|
||||||
|
|
|
@ -11,8 +11,8 @@ const https = require('https');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
cert: fs.readFileSync('etc/tls/fullchain.pem'),
|
// cert: fs.readFileSync('etc/tls/fullchain.pem'),
|
||||||
key: fs.readFileSync('etc/tls/privkey.pem')
|
// key: fs.readFileSync('etc/tls/privkey.pem')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue