workouttest_backoffice/Dockerfile
Tibor Bossanyi (Freelancer) 83736df898 V1.30.5 set cron
2021-10-02 08:25:43 +02:00

30 lines
874 B
Docker

FROM python:3.7
WORKDIR /aitrainer_backoffice
ADD . /aitrainer_backoffice/
RUN /usr/local/bin/python -m pip install --upgrade pip
RUN apt-get update && apt-get install vim -y
RUN apt-get -y install cron
# Copy cron file to the cron.d directory
COPY aitrainer-cron /etc/cron.d/hello-cron
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/aitrainer-cron
# Apply cron job
RUN crontab /etc/cron.d/aitrainer-cron
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
RUN pip3 install uwsgi
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY uwsgi_params /var/www/aitrainer.info/
COPY .key ./
ENV DJANGO_KEY="9ö2345iőjfdsasd9ukjhlkdf9hg"
ENV GOOGLE_APPLICATION_CREDENTIALS="/aitrainer_backoffice/aitrainer_backoffice/aitrainer_backoffice/asset/aitrainer-firebase-adminsdk.json"
ENV PORT=8000
EXPOSE 8000