Skip to content

Commit

Permalink
add api and n8n
Browse files Browse the repository at this point in the history
  • Loading branch information
ezedinff committed Feb 23, 2025
1 parent 8d9fe29 commit 8c105cb
Show file tree
Hide file tree
Showing 24 changed files with 4,373 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
dist
build
.DS_Store
logs/
37 changes: 37 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM python:3.12-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
gcc \
python3-dev \
libxml2-dev \
libxslt-dev \
&& rm -rf /var/lib/apt/lists/*

# Create log directory
RUN mkdir -p /app/logs && chmod 777 /app/logs

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY app.py .

# Environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
ENV PYTHONUNBUFFERED=1

# Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5000/health || exit 1

# Expose port
EXPOSE 5000

# Run application
CMD ["python", "app.py"]
Loading

0 comments on commit 8c105cb

Please sign in to comment.