Skip to content

Commit 374ec78

Browse files
committed
ci: test tyr-worker
1 parent 6fa65e9 commit 374ec78

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

docker/debian11/Dockerfile-tyr-worker

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM debian:bullseye-slim
22

3+
# COPY ./source .
4+
35
RUN apt-get update \
46
&& apt install -y python git libgeos-c1v5 libpq5 curl gcc pkg-config libssl-dev
57

@@ -24,22 +26,21 @@ RUN cd tartare-tools \
2426
&& cp target/release/enrich-ntfs-with-addresses /usr/bin/ \
2527
&& cp target/release/split-trip-geometries /usr/bin/ \
2628
&& cd .. \
27-
&& rm -rf tartare-tools
29+
&& rm -rf tartare-tools \
30+
&& mkdir /usr/src/app \
31+
&& mkdir /usr/src/app/tyr \
32+
&& cp -R source/tyr /usr/src/app/tyr
2833

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

3136
# # install navitia-common package
3237
# RUN dpkg -i ./navitia-common_*.deb || exit 0
33-
3438
# # install navitia-tyr package
3539
# RUN dpkg -i ./navitia-tyr_*.deb || exit 0
36-
3740
# # install navitia-ed package
3841
# RUN dpkg -i ./navitia-ed_*.deb || exit 0
39-
4042
# # install navitia-cities package
4143
# RUN dpkg -i ./navitia-cities_*.deb || exit 0
42-
4344
# # install navitia-mimirsbrunn package
4445
# RUN dpkg -i ./mimirsbrunn7_jessie-*.deb \
4546
# # install cosmogony2cities package
@@ -57,22 +58,27 @@ RUN cd tartare-tools \
5758
# mimirsbrunn7_jessie-*.deb \
5859
# cosmogony2cities_*.deb
5960

61+
62+
WORKDIR /usr/src/app/
63+
6064
# install tyr requirements
61-
RUN pip install --no-cache-dir -r /usr/share/tyr/requirements.txt
65+
RUN pip install --no-cache-dir -r /usr/src/app/tyr/requirements.txt
6266

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

68-
6972
EXPOSE 5000
7073

71-
72-
WORKDIR /usr/src/app/
73-
RUN cp /usr/bin/manage_tyr.py /usr/src/app/manage_tyr.py
74+
# RUN cp /usr/bin/manage_tyr.py /usr/src/app/manage_tyr.py
7475

7576
# TODO change the user to remove this ugly C_FORCE_ROOT
7677
ENV C_FORCE_ROOT=1
7778
ENV TYR_WORKER_N_PROC=1
78-
ENTRYPOINT ["celery", "worker", "-A", "tyr.tasks", "-O", "fair"]
79+
80+
# COPY docker/run_tyr_worker.sh /usr/src/app/
81+
# RUN chmod +x /usr/src/app/run_tyr_worker.sh
82+
# ENTRYPOINT ["bash", "/usr/src/app/run_tyr_worker.sh"]
83+
84+
ENTRYPOINT ["celery", "worker", "-A", "tyr.tasks", "-O", "fair"]

0 commit comments

Comments
 (0)