Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 38ec29b1

Přidáno uživatelem Tomáš Ballák před asi 4 roky(ů)

crawler prepared

Zobrazit rozdíly:

docker-compose.yml
13 13
                        - ./modules/crawler/:/src
14 14
                        - ./logs/crawler:/log/
15 15
                container_name: "heatmap_crawler"
16
                environment:
17
                        - TZ=Europe/Prague
16 18
                
17 19
       php-fpm:
18 20
               build: './docker/php-fpm'
docker/crawler/Dockerfile
4 4
RUN yes | apt-get install software-properties-common
5 5
RUN apt-get install dialog apt-utils -y
6 6
RUN pip install -q --no-cache-dir --upgrade pip
7
ADD crontab /etc/cron.d/simple-cron
8
RUN chmod 0644 /etc/cron.d/simple-cron
9
RUN crontab /etc/cron.d/simple-cron
7
ADD crontab /etc/cron.d/crawler-cron
8
RUN chmod 0644 /etc/cron.d/crawler-cron
9
RUN crontab /etc/cron.d/crawler-cron
10 10

  
11 11
ADD requirements.txt /requirements.txt
12 12
RUN pip install -r /requirements.txt
modules/crawler/crontab
1
0 1 * * * echo test
1
00 00 * * * /usr/local/bin/python /src/test.py
2 2
# Mandatory blank line
modules/crawler/test.py
1
import emoji
2
print(emoji.emojize("Python is :thumbs_up:"), file=open("/src/test.txt", "a"))

Také k dispozici: Unified diff