feat: Add container restart functionality from web UI
- Added restart button to settings page - Created /api/restart endpoint (file-flag based) - Implemented watch-restart.sh daemon - Added systemd service for restart watcher - Updated README with restart setup instructions - Container automatically restarts when settings changed Settings flow: 1. User edits settings in web UI 2. Click 'Save Settings' to persist to .env 3. Click 'Restart Bot' to apply changes 4. Watcher detects flag and restarts container 5. New settings loaded automatically
This commit is contained in:
@@ -46,14 +46,15 @@ RUN npm run build
|
||||
# ================================
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
# Install dumb-init for proper signal handling
|
||||
RUN apk add --no-cache dumb-init
|
||||
# Install dumb-init for proper signal handling and Docker CLI for restart capability
|
||||
RUN apk add --no-cache dumb-init docker-cli
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup --system --gid 1001 nodejs && \
|
||||
adduser --system --uid 1001 nextjs
|
||||
adduser --system --uid 1001 nextjs && \
|
||||
addgroup nextjs root
|
||||
|
||||
# Copy necessary files from builder
|
||||
COPY --from=builder /app/next.config.js ./
|
||||
|
||||
Reference in New Issue
Block a user