docker file update

This commit is contained in:
NW 2024-12-14 13:46:03 +00:00
parent 12d29c66b9
commit d918de0386
2 changed files with 22 additions and 17 deletions

View File

@ -2,10 +2,12 @@ FROM node:22
WORKDIR /app
# Копируем только package.json и package-lock.json для установки зависимостей
COPY package*.json /app/
COPY src/ /app/src/
#COPY db/shop.db /app/shop.db
# Устанавливаем зависимости
RUN npm install
# Исходный код и другие файлы будут синхронизироваться через volume mounts
CMD ["node", "src/index.js"]

View File

@ -1,17 +1,20 @@
version: "3.3"
services:
telegram_shop_prod:
build:
context: .
dockerfile: ./Dockerfile
hostname: telegram_shop_prod
container_name: telegram_shop_prod
restart: always
environment:
- BOT_TOKEN=7626758249:AAEdcbXJpW1VsnJJtc8kZ5VBsYMFR242wgk
- ADMIN_IDS=732563549,390431690,217546867
- SUPPORT_LINK=https://t.me/neroworm
- CATALOG_PATH=./catalog
volumes:
- ./db:/app/db/
telegram_shop_prod:
build:
context: .
dockerfile: ./Dockerfile
hostname: telegram_shop_prod
container_name: telegram_shop_prod
restart: always
environment:
- BOT_TOKEN=7626758249:AAEdcbXJpW1VsnJJtc8kZ5VBsYMFR242wgk
- ADMIN_IDS=732563549,390431690,217546867
- SUPPORT_LINK=https://t.me/neroworm
- CATALOG_PATH=./catalog
volumes:
- ./db:/app/db/ # Синхронизация базы данных
- ./src:/app/src/ # Синхронизация исходного кода
- ./package.json:/app/package.json # Синхронизация package.json
- ./package-lock.json:/app/package-lock.json # Синхронизация package-lock.json