Skip to content

Commit

Permalink
ci: test tyr-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien3d committed Oct 7, 2024
1 parent 6fa65e9 commit c5acfa5
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions docker/debian11/Dockerfile-tyr-worker
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM debian:bullseye-slim

# COPY ./source .

RUN apt-get update \
&& apt install -y python git libgeos-c1v5 libpq5 curl gcc pkg-config libssl-dev

Expand All @@ -24,22 +26,22 @@ RUN cd tartare-tools \
&& cp target/release/enrich-ntfs-with-addresses /usr/bin/ \
&& cp target/release/split-trip-geometries /usr/bin/ \
&& cd .. \
&& rm -rf tartare-tools
&& rm -rf tartare-tools \
&& mkdir /usr/src \
&& mkdir /usr/src/app \
&& mkdir /usr/src/app/tyr \
&& cp source/tyr /usr/src/app/tyr

# COPY navitia-common_*deb navitia-tyr_*.deb navitia-ed_*.deb navitia-cities_*.deb mimirsbrunn7_jessie-*.deb cosmogony2cities_*.deb mimirsbrunn-config-*.deb ./

# # install navitia-common package
# RUN dpkg -i ./navitia-common_*.deb || exit 0

# # install navitia-tyr package
# RUN dpkg -i ./navitia-tyr_*.deb || exit 0

# # install navitia-ed package
# RUN dpkg -i ./navitia-ed_*.deb || exit 0

# # install navitia-cities package
# RUN dpkg -i ./navitia-cities_*.deb || exit 0

# # install navitia-mimirsbrunn package
# RUN dpkg -i ./mimirsbrunn7_jessie-*.deb \
# # install cosmogony2cities package
Expand All @@ -57,22 +59,27 @@ RUN cd tartare-tools \
# mimirsbrunn7_jessie-*.deb \
# cosmogony2cities_*.deb


WORKDIR /usr/src/app/

# install tyr requirements
RUN pip install --no-cache-dir -r /usr/share/tyr/requirements.txt
RUN pip install --no-cache-dir -r /usr/src/app/tyr/requirements.txt

RUN apt install -y --force-yes unzip
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install


EXPOSE 5000


WORKDIR /usr/src/app/
RUN cp /usr/bin/manage_tyr.py /usr/src/app/manage_tyr.py
# RUN cp /usr/bin/manage_tyr.py /usr/src/app/manage_tyr.py

# TODO change the user to remove this ugly C_FORCE_ROOT
ENV C_FORCE_ROOT=1
ENV TYR_WORKER_N_PROC=1
ENTRYPOINT ["celery", "worker", "-A", "tyr.tasks", "-O", "fair"]

# COPY docker/run_tyr_worker.sh /usr/src/app/
# RUN chmod +x /usr/src/app/run_tyr_worker.sh
# ENTRYPOINT ["bash", "/usr/src/app/run_tyr_worker.sh"]

ENTRYPOINT ["celery", "worker", "-A", "tyr.tasks", "-O", "fair"]

0 comments on commit c5acfa5

Please sign in to comment.