1
1
FROM debian:bullseye-slim
2
2
3
+ # COPY ./source .
4
+
3
5
RUN apt-get update \
4
6
&& apt install -y python git libgeos-c1v5 libpq5 curl gcc pkg-config libssl-dev
5
7
@@ -24,22 +26,21 @@ RUN cd tartare-tools \
24
26
&& cp target/release/enrich-ntfs-with-addresses /usr/bin/ \
25
27
&& cp target/release/split-trip-geometries /usr/bin/ \
26
28
&& 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
28
33
29
34
# COPY navitia-common_*deb navitia-tyr_*.deb navitia-ed_*.deb navitia-cities_*.deb mimirsbrunn7_jessie-*.deb cosmogony2cities_*.deb mimirsbrunn-config-*.deb ./
30
35
31
36
# # install navitia-common package
32
37
# RUN dpkg -i ./navitia-common_*.deb || exit 0
33
-
34
38
# # install navitia-tyr package
35
39
# RUN dpkg -i ./navitia-tyr_*.deb || exit 0
36
-
37
40
# # install navitia-ed package
38
41
# RUN dpkg -i ./navitia-ed_*.deb || exit 0
39
-
40
42
# # install navitia-cities package
41
43
# RUN dpkg -i ./navitia-cities_*.deb || exit 0
42
-
43
44
# # install navitia-mimirsbrunn package
44
45
# RUN dpkg -i ./mimirsbrunn7_jessie-*.deb \
45
46
# # install cosmogony2cities package
@@ -57,22 +58,27 @@ RUN cd tartare-tools \
57
58
# mimirsbrunn7_jessie-*.deb \
58
59
# cosmogony2cities_*.deb
59
60
61
+
62
+ WORKDIR /usr/src/app/
63
+
60
64
# 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
62
66
63
67
RUN apt install -y --force-yes unzip
64
68
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
65
69
RUN unzip awscliv2.zip
66
70
RUN ./aws/install
67
71
68
-
69
72
EXPOSE 5000
70
73
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
74
75
75
76
# TODO change the user to remove this ugly C_FORCE_ROOT
76
77
ENV C_FORCE_ROOT=1
77
78
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