Docker setup
This commit is contained in:
parent
745ba4d903
commit
09b175f88d
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
.git
|
||||
node_modules
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
node_modules
|
||||
node_modules
|
||||
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM node:18-alpine as base
|
||||
|
||||
WORKDIR /src
|
||||
COPY package*.json /
|
||||
EXPOSE 2428
|
||||
|
||||
FROM base as production
|
||||
ENV NODE_ENV=production
|
||||
RUN npm ci
|
||||
COPY . /
|
||||
CMD ["node", "bin/www"]
|
||||
|
||||
FROM base as dev
|
||||
ENV NODE_ENV=development
|
||||
RUN npm install -g nodemon && npm install
|
||||
COPY . /
|
||||
CMD ["nodemon", "bin/www"]
|
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@ -0,0 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: ./
|
||||
target: dev
|
||||
volumes:
|
||||
- .:/src
|
||||
command: npm run start:dev
|
||||
ports:
|
||||
- "2428:2428"
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
DEBUG: nodejs-docker-express:*
|
4204
package-lock.json
generated
4204
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -23,11 +23,11 @@
|
||||
"colors": "^1.4.0",
|
||||
"express": "^4.17.1",
|
||||
"gamedig": "^2.0.23",
|
||||
"markdown-it": "^10.0.0",
|
||||
"markdown-it": "^13.0.1",
|
||||
"os": "^0.1.1",
|
||||
"socket.io": "^3.0.1",
|
||||
"socket.io": "^4.5.4",
|
||||
"striptags": "^3.1.1",
|
||||
"systeminformation": "^4.16.0"
|
||||
"systeminformation": "^5.15.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.13.0",
|
||||
|
Loading…
Reference in New Issue
Block a user