mirror of
				https://github.com/fhswf/aki_prj23_transparenzregister.git
				synced 2025-11-04 13:29:41 +01:00 
			
		
		
		
	Includes a new "app" running the ingestion jobs (aka fetch_news and find_missing_companies + enrich_company_financials) on a schedule. This also fixes an issue with the previous schedule implementation by persisting the schedule in a file that survives new deployment and continues where it left off.
		
			
				
	
	
		
			63 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM python:3.11-slim as base
 | 
						|
LABEL AUTHOR="AKI Projektseminar 23" \
 | 
						|
      PROJECT="Transparenzregister" \
 | 
						|
      ORGANISATION="fh-swf.de"
 | 
						|
 | 
						|
ENV SQLALCHEMY_SILENCE_UBER_WARNING="1"
 | 
						|
 | 
						|
ARG APP_HOME="transparenzregister"
 | 
						|
ARG GIT_HASH
 | 
						|
ENV GIT_HASH=${GIT_HASH}
 | 
						|
LABEL GIT_HASH=${GIT_HASH}
 | 
						|
 | 
						|
WORKDIR /${APP_HOME}/
 | 
						|
USER root
 | 
						|
RUN apt update -y && \
 | 
						|
    apt install git sqlite3 -y && \
 | 
						|
    rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
COPY dist/*.whl dist/
 | 
						|
 | 
						|
RUN pip install --find-links=dist aki-prj23-transparenzregister --no-cache-dir
 | 
						|
 | 
						|
FROM base as ingest
 | 
						|
 | 
						|
LABEL PART="DATA_INGESTOR"
 | 
						|
 | 
						|
### Install Chrome ###
 | 
						|
# Update the package lists
 | 
						|
RUN apt-get update
 | 
						|
 | 
						|
# Install wget and unzip
 | 
						|
RUN apt-get install -y wget unzip
 | 
						|
 | 
						|
# Install Google Chrome
 | 
						|
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 | 
						|
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
 | 
						|
 | 
						|
RUN pip install --find-links=dist aki-prj23-transparenzregister[ingest]  --no-cache-dir && \
 | 
						|
    rm dist/ -R
 | 
						|
 | 
						|
ENTRYPOINT ["ingest", "ENV"]
 | 
						|
CMD ["--level", "DEBUG"]
 | 
						|
 | 
						|
FROM base as data-transformation
 | 
						|
 | 
						|
LABEL PART="DATA-TRANSFORMATION"
 | 
						|
 | 
						|
RUN pip install --find-links=dist aki-prj23-transparenzregister[transformation] --no-cache-dir && \
 | 
						|
    rm dist/ -R
 | 
						|
 | 
						|
ENTRYPOINT ["data-processing", "ENV"]
 | 
						|
CMD ["--level", "DEBUG"]
 | 
						|
 | 
						|
FROM base as web-server
 | 
						|
 | 
						|
LABEL PART="WEB-SERVER"
 | 
						|
 | 
						|
RUN pip install --find-links=dist aki-prj23-transparenzregister[web-server] --no-cache-dir && \
 | 
						|
    rm dist/ -R
 | 
						|
 | 
						|
ENTRYPOINT ["webserver", "ENV"]
 | 
						|
CMD ["--level", "DEBUG"]
 |