Skip to content

Commit 1aeb131

Browse files
committed
fix: docker
1 parent f605a4b commit 1aeb131

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

.github/workflows/etl_release.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on: push
77
jobs:
88
# release:
99
# uses: ./.github/workflows/_release.yaml
10-
# needs:
11-
# - test
1210

1311
create-deploy-env:
1412
runs-on: ubuntu-latest

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ on: push
66

77
jobs:
88
test:
9-
uses: ./.github/workflows/test.yml
9+
uses: ./.github/workflows/test.yml

etl/Dockerfile.extract

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# Dockerfile for running extract.py
1+
ARG ENVIRONMENT="prod"
22

3-
FROM python:3.11-slim
3+
# Use the official Python image from the Docker Hub
4+
FROM python:3.10
45

6+
# Set the working directory in the container
57
WORKDIR /app
8+
COPY pyproject.toml ./
9+
COPY src/birdxplorer_etl/__init__.py ./src/birdxplorer_etl/
10+
COPY .env ./
611

7-
RUN apt-get update \
8-
&& apt-get install -y --no-install-recommends \
9-
gcc \
10-
libpq-dev \
11-
&& rm -rf /var/lib/apt/lists/*
12+
RUN python -m pip install --no-cache-dir --upgrade pip && \
13+
pip install --no-cache-dir -e .[prod]
1214

13-
RUN pip install --no-cache-dir \
14-
requests \
15-
stringcase \
16-
sqlalchemy \
17-
psycopg2-binary
15+
RUN apt-get update && apt-get install -y --no-install-recommends libpq5 postgresql-client-15 sqlite3 \
16+
&& apt-get clean \
17+
&& rm -rf /var/lib/apt/lists/*
1818

19-
COPY etl/. .
19+
COPY . ./
2020

21-
# 6. Entrypoint to run extract.py
22-
ENTRYPOINT ["python", "-u", "src/birdxplorer_etl/run_extract.py"]
21+
# Set the entry point to run the Prefect flow
22+
ENTRYPOINT ["python", "src/birdxplorer_etl/main.py"]

0 commit comments

Comments
 (0)