Fixed build for bot compose docker.

This commit is contained in:
ruberoid 2025-01-08 00:33:19 +04:00
parent 6a55314183
commit 7590316171
3 changed files with 40 additions and 0 deletions

18
client/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:21
WORKDIR /app
COPY . .
RUN apt-get update && apt-get install libsqlite3-dev sqlite3 -y
RUN ls -la /app/db
#RUN sleep 10
RUN npm install sqlite3 --save
RUN npm install --verbose
CMD [ "npm", "run", "start:dev" ]

22
docker-compose.yaml Normal file
View File

@ -0,0 +1,22 @@
services:
bot:
build:
context: ./client
dockerfile: ./Dockerfile
environment:
- TZ=Europe/Moscow
- NODE_ENV=development
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
networks:
- one_ton_daily_bot_network
#volumes:
# - ../../client/src:/app/src
# - ../../db:/app/db
restart: unless-stopped
networks:
one_ton_daily_bot_network:
volumes:
db:
external: true