Skip to content

Commit 1ed5f43

Browse files
author
Logan Sulpizio
committed
optimize docker configuration
1 parent b3bc340 commit 1ed5f43

5 files changed

Lines changed: 22 additions & 19 deletions

File tree

.dockerignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@ __pycache__/
33
*.pyc
44
*.pyo
55
*.pyd
6-
logs/
76
.git/
87
.gitignore
98
.env
10-
*csv
11-
*parquet
9+
.env.*
10+
logs/
11+
**/*.csv
12+
**/*.parquet
13+
data/cache/*
14+
!data/cache/.gitkeep
1215
data/rent_files_parquet/list_rent_files_collected.json
1316
data/realtokens_data.json
1417
data/realtokens_history.json
1518
data/rent_files_parquet/parquet_by_year/*
1619
!data/rent_files_parquet/parquet_by_year/.gitkeep
20+
data/rent_files_duckdb/*
21+
!data/rent_files_duckdb/.gitkeep
1722
google-drive-service-account.json

core/income/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
from .load_weekly_distributions_from_parquet import load_weekly_distributions_from_parquet
2-
from .load_weekly_distributions_from_duckdb import load_weekly_distributions_from_duckdb
1+
from .load_weekly_distributions_from_parquet import load_weekly_distributions_from_parquet

dockerfile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
55

66
WORKDIR /app
77

8-
# System deps (optional but common)
98
RUN apt-get update && apt-get install -y --no-install-recommends \
10-
curl \
119
supervisor \
1210
&& rm -rf /var/lib/apt/lists/*
1311

14-
# Install Python deps first (better layer cache)
12+
1513
COPY requirements.txt /app/requirements.txt
16-
RUN pip install --no-cache-dir -r /app/requirements.txt
14+
RUN pip install --no-cache-dir --no-compile -r requirements.txt
1715

1816
# Copy the application
19-
COPY . /app
20-
21-
# Create logs directory (your app writes to /app/logs)
17+
COPY api ./api
18+
COPY core ./core
19+
COPY config ./config
20+
COPY job ./job
21+
COPY data ./data
22+
COPY Ressources ./Ressources
23+
COPY supervisord.conf .
24+
COPY entrypoint.sh .
25+
26+
# Create logs directory
2227
RUN mkdir -p /app/logs
2328

24-
# Copy supervisord config
25-
COPY supervisord.conf /app/supervisord.conf
26-
27-
# Entrypoint
28-
COPY entrypoint.sh /app/entrypoint.sh
29-
RUN chmod +x /app/entrypoint.sh
29+
RUN chmod +x /app/entrypoint.sh && mkdir -p /app/logs
3030

3131
CMD ["/app/entrypoint.sh"]

job/rent_files/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
from .build_google_credentials import build_google_credentials
66
from .extract_year_week import extract_year_week
77
from .upsert_weekly_rent_csv_to_parquet import upsert_weekly_rent_csv_to_parquet
8-
from .upsert_weekly_rent_csv_to_duckdb import upsert_weekly_rent_csv_to_duckdb
98
from .save_processed_id import save_processed_id

requirements.txt

-202 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)