first commit

This commit is contained in:
2025-07-21 00:45:28 +02:00
parent ab10b0f9a1
commit 93232a1663
39 changed files with 4860 additions and 0 deletions

38
bot/Dockerfile.dev Normal file
View File

@@ -0,0 +1,38 @@
# Development Dockerfile z hot reload
FROM node:18-alpine
# Zainstaluj nodemon globalnie
RUN npm install -g nodemon concurrently
# Ustaw workdir
WORKDIR /app
# Kopiuj package.json files
COPY package*.json ./
COPY frontend/package*.json ./frontend/
# Zainstaluj wszystkie zależności (including dev dependencies)
RUN npm install
# Zainstaluj zależności frontendu
WORKDIR /app/frontend
RUN npm install
# Wróć do głównego katalogu
WORKDIR /app
# Expose ports
EXPOSE 3000 3001 9229
# Kopiuj pozostałe pliki (będzie nadpisane przez volume w dev)
COPY . .
# Stwórz katalogi dla logów
RUN mkdir -p logs
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })" || exit 1
# Default command (może być nadpisane w docker-compose)
CMD ["npm", "run", "dev"]