Update docker settings

This commit is contained in:
Sergey Karmanov 2023-03-17 15:50:23 +03:00
parent 52684a0b7c
commit 65d7c642bf
Signed by: serega404
GPG Key ID: 97CADD982D88DF68
3 changed files with 10 additions and 9 deletions

View File

@ -1,18 +1,17 @@
FROM python:3.11.1-alpine3.17
FROM python:3.11.2-alpine3.17
LABEL Maintainer="serega404"
WORKDIR /app
COPY ./requirements.txt requirements.txt
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
# Setting up crontab
COPY crontab /tmp/crontab
RUN cat /tmp/crontab > /etc/crontabs/root
COPY main.py main.py
RUN /usr/bin/crontab /etc/cron.d/crontab
# run crond as main process of container
CMD ["/usr/sbin/crond", "-f"]
CMD ["crond", "-f", "-l", "2"]

View File

@ -1,6 +1,6 @@
# MetricAliexpressExchangeRate
[![MIT License](https://img.shields.io/github/license/serega404/EasyESPRealy)](https://github.com/serega404/MetricAliexpressExchangeRate)
[![MIT License](https://img.shields.io/github/license/serega404/MetricAliexpressExchangeRate)](https://github.com/serega404/MetricAliexpressExchangeRate)
Экспортер курса Aliexpress и ЦБ РФ
@ -35,6 +35,7 @@ docker run -d --name MetricAliexpressExchangeRate \
### Библиотеки
* [Requests](https://requests.readthedocs.io/en/latest/)
* [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/)
### Лицензия

View File

@ -1 +1,2 @@
*/10 * * * * python3 /app/main.py >> /tmp/out.log
@reboot cd /app && python3 /app/main.py
*/10 * * * * cd /app && python3 /app/main.py