Skip to content

Commit dcdb007

Browse files
committed
document api finished
1 parent 6ed5543 commit dcdb007

24 files changed

+253
-975
lines changed

servers/app.Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM python:3.9
2+
EXPOSE 5000
3+
RUN apt-get update && apt-get -y install qpdf poppler-utils && apt-get install -y build-essential libpoppler-cpp-dev pkg-config python-dev
4+
COPY requirements.txt .
5+
RUN pip3 install --upgrade pip
6+
RUN pip3 install -r requirements.txt
7+
WORKDIR /opt/metadata-extraction
8+
ENV PYTHONPATH .

servers/celery.Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM python:3.9
2+
RUN apt-get update && apt-get -y install qpdf poppler-utils && apt-get install -y build-essential libpoppler-cpp-dev pkg-config python-dev
3+
RUN apt -y install tesseract-ocr && apt -y install libtesseract-dev
4+
COPY requirements.txt .
5+
RUN pip3 install --upgrade pip
6+
RUN pip3 install -r requirements.txt
7+
WORKDIR /opt/metadata-extraction/tenant
8+
ENV PYTHONPATH ..

servers/docker-compose.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: '3'
2+
services:
3+
host-injector:
4+
container_name: host_c
5+
volumes:
6+
- '/var/run/docker.sock:/tmp/docker.sock'
7+
- '/etc/hosts:/tmp/hosts'
8+
image: dvdarias/docker-hoster
9+
redis:
10+
hostname: redis.wlp.com
11+
image: redis:latest
12+
container_name: rd01
13+
ports:
14+
- "6379:6379"
15+
volumes:
16+
- "redis:/data"
17+
worker:
18+
hostname: celery.wlp.com
19+
depends_on:
20+
- "redis"
21+
build:
22+
context: .
23+
dockerfile: celery.Dockerfile
24+
volumes:
25+
- .:/opt/metadata-extraction
26+
command: celery -A config.client worker --loglevel=info -f celery.logs -Ofair -c 2
27+
tty: true
28+
app:
29+
hostname: app.wlp.com
30+
depends_on:
31+
- "redis"
32+
build:
33+
context: .
34+
dockerfile: app.Dockerfile
35+
volumes:
36+
- .:/opt/metadata-extraction
37+
container_name: app01
38+
ports:
39+
- "6767:6767"
40+
command: python3 tenant/server.py
41+
tty: true
42+
flower:
43+
hostname: flower.wlp.com
44+
image: mher/flower
45+
container_name: flower01
46+
environment:
47+
- CELERY_BROKER_URL=redis://redis:6379/0
48+
- FLOWER_PORT=8888
49+
ports:
50+
- "8888:8888"
51+
volumes:
52+
redis:

servers/kill-cluster.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker-compose kill

servers/start-cluster.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdir uploads -p
2+
docker-compose up -d --build

servers/tenant/blueprints/event_driven/pieces.py

-56
This file was deleted.

0 commit comments

Comments
 (0)