Add Docker production setup
This commit is contained in:
parent
21cdcfb376
commit
1894cf6894
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
.git
|
||||
deploy.log
|
||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3005
|
||||
|
||||
CMD ["node", "app.js"]
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
plusfit24:
|
||||
build: .
|
||||
container_name: plusfit24
|
||||
restart: always
|
||||
ports:
|
||||
- "3005:3005"
|
||||
env_file:
|
||||
- .env
|
||||
Loading…
Reference in New Issue
Block a user