Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienheureux committed Jan 16, 2025
1 parent b11de77 commit d50bdc2
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,5 @@
}
]
},
"generated_at": "2025-01-14T12:14:14Z"
"generated_at": "2025-01-16T13:18:21Z"
}
2 changes: 1 addition & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
services: docker compose --profile lvao up
web: .venv/bin/python manage.py runserver 0.0.0.0:8000
web: poetry run python manage.py runserver 0.0.0.0:8000
npm: rm -rf .parcel-cache; npm run watch
20 changes: 12 additions & 8 deletions airflow-scheduler.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ COPY pyproject.toml poetry.lock ./
RUN --mount=type=cache,target=${POETRY_CACHE_DIR} poetry sync --with airflow --no-root



FROM apache/airflow:2.10.4 AS scheduler
USER ${AIRFLOW_UID:-50000}
USER root
WORKDIR /opt/
RUN apt-get update
RUN apt-get install unzip
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install

USER ${AIRFLOW_UID:-50000}:0
WORKDIR /opt/airflow
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal \
C_INCLUDE_PATH=/usr/include/gdal \
VIRTUAL_ENV=/home/airflow/.local \
Expand All @@ -37,17 +47,11 @@ ENV CPLUS_INCLUDE_PATH=/usr/include/gdal \
COPY --from=python-builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY --from=builder ${CPLUS_INCLUDE_PATH} ${CPLUS_INCLUDE_PATH}

# Use user airflow
WORKDIR /opt/airflow
USER ${AIRFLOW_UID:-50000}:0
RUN chown -R ${AIRFLOW_UID:-50000}:0 .

# Set current directory to airflow root
# Copy the dags, logs, config, and plugins directories to the appropriate locations
COPY sync_dags.sh /opt/airflow/sync_dags.sh
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
unzip awscliv2.zip \
./aws/install

# Nécessaire pour faire fonctionner Django dans Airflow
COPY core qfdmo qfdmd dsfr_hacks ./

Expand Down
32 changes: 31 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ version = "1.57.0"
description = ""
license = "MIT"
readme = "README.md"
requires-python = "^3.12,<3.13"
requires-python = ">=3.12,<3.13"

[tool.poetry]
package-mode = false
Expand Down

0 comments on commit d50bdc2

Please sign in to comment.