Niv Sardi commited on
Commit
258f7cd
1 Parent(s): fa99063

add crawler to docker-compose

Browse files

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>

Files changed (1) hide show
  1. docker-compose.yaml +11 -1
docker-compose.yaml CHANGED
@@ -1,5 +1,13 @@
1
  version: "3.9" # optional since v1.27.0
2
  services:
 
 
 
 
 
 
 
 
3
  puppet:
4
  build:
5
  dockerfile: Dockerfile.deno
@@ -12,7 +20,7 @@ services:
12
  DEBUG: "puppet"
13
  depends_on:
14
  - "browserless"
15
- # command: "sh -c 'while echo deno; do sleep 3h; done'" #
16
  command: "deno run --allow-net --allow-env --allow-read --allow-write src/index.ts"
17
  volumes:
18
  # - "./src:/app/src:z" # for debugging
@@ -23,6 +31,7 @@ services:
23
  condition: any
24
  delay: 600s
25
  window: 300s
 
26
  cutter:
27
  build:
28
  dockerfile: Dockerfile.python
@@ -32,6 +41,7 @@ services:
32
  volumes:
33
  # - "./crawler:/app/src:z" # for debugging
34
  - "./data:/app/data:z"
 
35
  browserless:
36
  image: docker.io/zenika/alpine-chrome
37
  entrypoint: ["sh", "-c", "while true; do chromium-browser --headless --use-gl=swiftshader --disable-software-rasterizer --disable-dev-shm-usage --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=3000; sleep 2; done"]
 
1
  version: "3.9" # optional since v1.27.0
2
  services:
3
+ crawler:
4
+ build:
5
+ dockerfile: Dockerfile.python
6
+ context: .
7
+ command: "python3 src/main.py"
8
+ volumes:
9
+ - "./data:/app/data:z"
10
+
11
  puppet:
12
  build:
13
  dockerfile: Dockerfile.deno
 
20
  DEBUG: "puppet"
21
  depends_on:
22
  - "browserless"
23
+ # command: "sh -c 'while echo deno; do sleep 3h; done'" # debug
24
  command: "deno run --allow-net --allow-env --allow-read --allow-write src/index.ts"
25
  volumes:
26
  # - "./src:/app/src:z" # for debugging
 
31
  condition: any
32
  delay: 600s
33
  window: 300s
34
+
35
  cutter:
36
  build:
37
  dockerfile: Dockerfile.python
 
41
  volumes:
42
  # - "./crawler:/app/src:z" # for debugging
43
  - "./data:/app/data:z"
44
+
45
  browserless:
46
  image: docker.io/zenika/alpine-chrome
47
  entrypoint: ["sh", "-c", "while true; do chromium-browser --headless --use-gl=swiftshader --disable-software-rasterizer --disable-dev-shm-usage --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=3000; sleep 2; done"]