archy/neode-ui/Dockerfile.backend
archipelago 79c3769542 feat(demo): curated cloud files drop-in + fix backend asset copies
- demo/files/<Folder>/<file> becomes the cloud's content for every visitor
  (read-only; "private login" = git/repo access). Text inlined, binaries streamed
  from disk; empty folder falls back to the built-in seeded set.
- Dockerfile.backend now copies docker/bitcoin-ui and demo/files into the image
  (they live outside neode-ui/) — this also fixes the Bitcoin UI mock, which the
  backend reads from /docker/bitcoin-ui and was previously absent in the container.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 11:11:40 -04:00

31 lines
897 B
Docker

FROM node:22-alpine
WORKDIR /app
# Install runtime dependencies
RUN apk add --no-cache wget curl docker-cli
# Copy package files
COPY neode-ui/package*.json ./
# Install Node dependencies (need all deps for mock backend)
RUN npm install
# Copy application code
COPY neode-ui/ ./
# Sibling assets the mock backend reads relative to /app (../docker, ../demo):
# the Bitcoin UI mock shell and any curated cloud files dropped into demo/files.
COPY docker/bitcoin-ui /docker/bitcoin-ui
COPY demo/files /demo/files
# Expose port
EXPOSE 5959
# Health check
HEALTHCHECK --interval=30s --timeout=15s --retries=5 --start-period=180s \
CMD wget --quiet --tries=1 --spider http://localhost:5959/health || exit 1
# Start the mock backend with error handling
CMD ["sh", "-c", "node mock-backend.js 2>&1 || (echo 'ERROR: Backend failed to start'; cat /app/package.json; ls -la /app; sleep infinity)"]