git / moonbite-network / deploy/Dockerfile.railway · raw

FROM python:3.11-slim# Install system dependenciesRUN apt-get update && apt-get install -y \    nginx \    certbot \    python3-certbot-nginx \    curl \    git \    build-essential \    && rm -rf /var/lib/apt/lists/*WORKDIR /app# Copy application filesCOPY requirements.txt .COPY requirements.lock .RUN pip install --no-cache-dir --require-hashes -r requirements.lockCOPY . .# Create necessary directoriesRUN mkdir -p /etc/letsencrypt /var/log/nginx /var/cache/nginx# Copy nginx configurationCOPY deploy/nginx.conf /etc/nginx/nginx.confCOPY deploy/ssl.conf /etc/nginx/ssl.conf# Copy startup scriptCOPY deploy/entrypoint-railway.sh /entrypoint.shRUN chmod +x /entrypoint.sh# Expose HTTPS portEXPOSE 443 80# Health checkHEALTHCHECK --interval=30s --timeout=10s --retries=3 \    CMD curl -f https://localhost/wallet 2>/dev/null || exit 1ENTRYPOINT ["/entrypoint.sh"]