|
@@ -5,8 +5,8 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
ENV PYTHONPATH "src"
|
|
|
|
|
|
-RUN apt-get update && apt-get install -y cron
|
|
|
-
|
|
|
+RUN apt-get update && apt-get install -y cron && touch /var/log/cron.log
|
|
|
+RUN service cron start
|
|
|
# Set the working directory in the container
|
|
|
WORKDIR /app
|
|
|
COPY requirements.txt /app
|
|
@@ -15,15 +15,18 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
# Copy the current directory contents into the container at /app
|
|
|
COPY . /app
|
|
|
-WORKDIR /app/src
|
|
|
+WORKDIR /app
|
|
|
# Collect static files
|
|
|
RUN python manage.py migrate
|
|
|
RUN python manage.py collectstatic --noinput
|
|
|
RUN python manage.py crontab add
|
|
|
RUN python manage.py crontab show
|
|
|
+RUN mkdir src/artifacts
|
|
|
|
|
|
WORKDIR /app
|
|
|
# Make port 8000 available to the world outside this container
|
|
|
EXPOSE 8000
|
|
|
+COPY start.sh /app
|
|
|
+RUN chmod +x /app/start.sh
|
|
|
# Run app.py when the container launches
|
|
|
-CMD ["gunicorn", "--bind", "0.0.0.0:8000", "src.wsgi:application"]
|
|
|
+CMD ["./start.sh"]
|