Files
moto-adv-website/Dockerfile
ske087 fc463dc69a Migrate from Next.js to Flask: Complete motorcycle adventure community website
- Replace Next.js/React implementation with Python Flask
- Add colorful blue-purple-teal gradient theme replacing red design
- Integrate logo and Transalpina panoramic background image
- Implement complete authentication system with Flask-Login
- Add community features for stories and tracks sharing
- Create responsive design with Tailwind CSS
- Add error handling with custom 404/500 pages
- Include Docker deployment configuration
- Add favicon support and proper SEO structure
- Update content for Pensiune BuonGusto accommodation
- Remove deprecated Next.js files and dependencies

Features:
 Landing page with hero section and featured content
 User registration and login system
 Community section for adventure sharing
 Admin panel for content management
 Responsive mobile-first design
 Docker containerization with PostgreSQL
 Email integration with Flask-Mail
 Form validation with WTForms
 SQLAlchemy database models
 Error pages and favicon handling
2025-07-23 14:42:40 +03:00

30 lines
738 B
Docker

FROM python:3.11-slim
WORKDIR /opt/site/flask-moto-adventure
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create uploads directory
RUN mkdir -p uploads/images uploads/gpx
# Create non-root user
RUN adduser --disabled-password --gecos '' appuser && chown -R appuser:appuser /opt/site/flask-moto-adventure
USER appuser
# Expose port
EXPOSE 5000
# Run the application with Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--timeout", "120", "run:app"]