-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.yaml
170 lines (169 loc) · 4.33 KB
/
dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: '3.8'
services:
caddy:
container_name: gt-caddy
image: caddy:2.7.5-alpine
depends_on:
- frontend
ports:
- 80:80
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- django_staticfiles:/static
networks:
- griesheimtransparent
restart: unless-stopped
frontend: &frontend
image: griesheimtransparent-frontend
container_name: gt-frontend
build: ../frontend
depends_on:
- scraper-database
- solr
- previewservice
- tika
- pdfact
- gotenberg
environment:
- SECRET_KEY=${DJANGO_SECRET_KEY}
- SOLR_HOST=http://solr:8983/solr
- SOLR_COLLECTION=ris
- RIS_DB_HOST=scraper-database
- RIS_DB_PORT=5432
- RIS_DB_NAME=${SCRAPER_DB}
- RIS_DB_USER=${SCRAPER_DB_USER}
- RIS_DB_PASSWORD=${SCRAPER_DB_PASSWORD}
- DEBUG=${DEBUG}
- UPDATE_SOLR_CRON=${UPDATE_SOLR_CRON}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- DATABASE_PATH=/django_db/db.sqlite
- DJANGO_SU_NAME=${DJANGO_SU_NAME}
- DJANGO_SU_PASSWD=${DJANGO_SU_PASSWD}
- DJANGO_SU_EMAIL=${DJANGO_SU_EMAIL}
- PREVIEW_HOST=http://previewservice:8000
- TIKA_HOST=http://tika:9998
- PDFACT_HOST=http://pdfact:80
- GOTENBERG_HOST=http://gotenberg:3000
volumes:
- django_db:/django_db
- django_staticfiles:/app/staticfiles
- ./scraper_files:/filestore
ports:
- 8000:8000
# dev (serve static files)
#command: python manage.py runserver 0.0.0.0:8000
# prod/with webserver
command: gunicorn frontend.wsgi:application --bind 0.0.0.0:8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
start_period: 10s
retries: 10
networks:
- griesheimtransparent
restart: unless-stopped
# container for frontend cron jobs (processing)
frontend_cron:
<<: *frontend
container_name: gt-frontend_cron
ports: []
command: crond -f
healthcheck:
test: ["NONE"] # container dies with cron
# scraper cron service
scraper:
image: griesheimtransparent-scraper
container_name: gt-scraper
build: ../scraper
depends_on:
- scraper-database
environment:
- DB_NAME=${SCRAPER_DB}
- DB_USER=${SCRAPER_DB_USER}
- DB_PASSWORD=${SCRAPER_DB_PASSWORD}
- DB_HOST=scraper-database
- DB_PORT=5432
#command: crawl sessionnet -s SCRAPE_START=01/2023 -s SCRAPE_END=03/2023
entrypoint: crond -f -d 0
networks:
- griesheimtransparent
volumes:
- ./scraper_files:/scraper/filestore
restart: unless-stopped
# database for scraper
scraper-database:
image: postgres
container_name: gt-scraper-postgres
environment:
- POSTGRES_DB=${SCRAPER_DB}
- POSTGRES_USER=${SCRAPER_DB_USER}
- POSTGRES_PASSWORD=${SCRAPER_DB_PASSWORD}
ports:
- 5432:5432
networks:
- griesheimtransparent
volumes:
- scraper_db:/var/lib/postgresql
restart: unless-stopped
# solr search engine
solr:
image: griesheimtransparent-solr
container_name: gt-solr
build: ../solr
user: "8983"
environment:
- SOLR_LOG_LEVEL=FINEST
ports:
- 8983:8983
volumes:
- solr_data:/var/solr
networks:
- griesheimtransparent
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/ris/admin/ping"]
restart: unless-stopped
# tika (pdf to text)
tika:
image: apache/tika:1.28.4-full
container_name: gt-tika
expose:
- 9998
networks:
- griesheimtransparent
restart: unless-stopped
# pdf to text with pdfact
pdfact:
image: dnlbauer/pdfact-service:latest
container_name: gt-pdfact
expose:
- 80
networks:
- griesheimtransparent
restart: unless-stopped
# gotenberg file conversion (doc to pdf)
gotenberg:
image: gotenberg/gotenberg:7
container_name: gt-gotenberg
expose:
- 3000
networks:
- griesheimtransparent
restart: unless-stopped
# pdf preview image generator
previewservice:
image: fpurchess/preview-service
container_name: gt-previewservice
expose:
- 8000
networks:
- griesheimtransparent
restart: unless-stopped
networks:
griesheimtransparent:
volumes:
caddy_data:
django_staticfiles:
solr_data:
django_db:
scraper_db: