dockerisation 🐬
This commit is contained in:
parent
6ced824e1c
commit
3331925b3d
8
.dockerignore
Normal file
8
.dockerignore
Normal file
|
@ -0,0 +1,8 @@
|
|||
node_modules/
|
||||
certs/
|
||||
.git/
|
||||
.DS_Store
|
||||
.gitignore
|
||||
README.md
|
||||
nodemon.json
|
||||
*.service
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
**/.DS_Store
|
||||
node_modules/
|
||||
certs/
|
||||
docker-compose*.yml
|
||||
!docker-compose-example.yml
|
||||
|
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM node:20-alpine3.18
|
||||
|
||||
# set working directory
|
||||
WORKDIR /srv/openterminal
|
||||
|
||||
# install dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD [ "node", "./server/main.js" ]
|
||||
|
14
docker-compose-example.yml
Normal file
14
docker-compose-example.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
version: "3.9"
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
image: openterminal
|
||||
container_name: openterminal
|
||||
ports:
|
||||
- 443:443
|
||||
volumes:
|
||||
- ./certs/cert.crt:/srv/openterminal/certs/cert.crt
|
||||
- ./certs/cert.key:/srv/openterminal/certs/cert.key
|
||||
environment:
|
||||
PORT: 443
|
||||
restart: unless-stopped
|
|
@ -65,7 +65,7 @@ This connection will now terminate.
|
|||
`;
|
||||
|
||||
|
||||
const PORT = process.env.PORT || 8080;
|
||||
const PORT = process.env.PORT || 8443;
|
||||
const PING_INTERVAL = 10000;
|
||||
let sockets = [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue