-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 815 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Use an official Python runtime as a parent image
FROM python:3.9-slim
ARG SUPABASE_URL
ARG SUPABASE_KEY
ARG COURIER_AUTH_TOKEN
ARG COURIER_TEMPLATE_ID
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
cron && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the run.sh script into the container
COPY run.sh /app/run.sh
# Make run.sh executable
RUN chmod +x /app/run.sh
# Create a log file
RUN touch /var/log/cron.log
# Run the script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]