Skip to content

Commit 2e2ed80

Browse files
committed
Changing docker script to give logs
1 parent 3f15c39 commit 2e2ed80

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM python:3.8-slim-buster
22

33
RUN apt-get update && apt-get install -y git
4+
RUN apt-get install -y procps
45

56
WORKDIR /app
67

@@ -9,4 +10,4 @@ RUN pip3 install -r requirements.txt
910

1011
COPY . .
1112

12-
CMD [ "./script.sh" ]
13+
CMD "./script.sh"

script.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
while true
2-
do
3-
pkill -f import_recent_changes.py &
4-
python import_recent_changes.py &
5-
sleep 300
2+
do
3+
echo "kill previews process"
4+
pkill -f import_recent_changes.py
5+
sleep 3
6+
echo "importing entity"
7+
python -u import_recent_changes.py &
8+
echo "import done"
9+
sleep 300
610
done

0 commit comments

Comments
 (0)