Добавление докера в проект

This commit is contained in:
adlevin
2025-08-16 03:30:08 +03:00
parent d3f76b1113
commit 4732b567b2
3 changed files with 38 additions and 0 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
Dockerfile
docker-compose.yml
.dockerignore
*.sh

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM node:18-alpine
WORKDIR /app
# Копируем package.json и устанавливаем зависимости
COPY package*.json ./
RUN npm install
# Копируем все файлы сайта
COPY . .
# Открываем порт
EXPOSE 8000
# Запускаем веб-сервер
CMD ["npm", "start"]

13
docker-compose.yml Normal file
View File

@@ -0,0 +1,13 @@
version: '3.8'
services:
web:
build: .
container_name: fidem_website
ports:
- "8000:8000"
volumes:
- .:/app
restart: unless-stopped
environment:
- NODE_ENV=production