Restore missing project configuration files
Restored all configuration and documentation files that were missing: - devenv.nix and devenv.lock for development environment - README.md, CLAUDE.md, DOCKER.md, WARP.md for documentation - alembic.ini for database migrations - requirements.txt for Python dependencies - Dockerfile, docker-compose.yml, entrypoint.sh for containerization - build.sh for build automation - pytest.ini for test configuration All database concurrency improvements and logging fixes remain intact. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
51
Dockerfile
Normal file
51
Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
||||
# Multi-stage Docker build for DosVault
|
||||
FROM python:3.11-slim as base
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
gcc \
|
||||
g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy Python dependencies
|
||||
COPY requirements.txt* pyproject.toml* ./
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt || \
|
||||
pip install --no-cache-dir fastapi uvicorn sqlalchemy alembic \
|
||||
aiohttp bcrypt python-jose python-multipart jinja2
|
||||
|
||||
# Copy application code
|
||||
COPY src/ ./src/
|
||||
COPY templates/ ./templates/
|
||||
COPY migrations/ ./migrations/
|
||||
COPY alembic.ini ./
|
||||
COPY CLAUDE.md README.md ./
|
||||
COPY entrypoint.sh ./
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p /app/data/logs /app/data/images /app/data/roms /app/data/metadata
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONPATH=/app/src
|
||||
ENV DOSFRONTEND_CONFIG_DIR=/app/data
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 8080 8081
|
||||
|
||||
# Create non-root user
|
||||
RUN useradd -m -u 1000 dosvault && \
|
||||
chown -R dosvault:dosvault /app
|
||||
USER dosvault
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8080/health || exit 1
|
||||
|
||||
# Default command
|
||||
# CMD ["python", "-m", "uvicorn", "src.webapp:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
Reference in New Issue
Block a user