🔨 Refactored Dockerfile

This commit is contained in:
Guillaume Jacquenot 2019-12-22 21:21:56 +01:00
parent d8ccc2c026
commit e8e95c6001

View File

@ -148,7 +148,7 @@ RUN chown -R postgres:postgres /var/lib/postgresql \
&& echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/12/main/pg_hba.conf \ && echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/12/main/pg_hba.conf \
&& echo "host all all ::/0 md5" >> /etc/postgresql/12/main/pg_hba.conf && echo "host all all ::/0 md5" >> /etc/postgresql/12/main/pg_hba.conf
# copy update scripts # Copy update scripts
COPY openstreetmap-tiles-update-expire /usr/bin/ COPY openstreetmap-tiles-update-expire /usr/bin/
RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \ RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \
&& mkdir /var/log/tiles \ && mkdir /var/log/tiles \
@ -156,12 +156,13 @@ RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \
&& ln -s /home/renderer/src/mod_tile/osmosis-db_replag /usr/bin/osmosis-db_replag \ && ln -s /home/renderer/src/mod_tile/osmosis-db_replag /usr/bin/osmosis-db_replag \
&& echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab && echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab
# install trim_osc.py helper script # Install trim_osc.py helper script
RUN mkdir -p /home/renderer/src \ RUN mkdir -p /home/renderer/src \
&& cd /home/renderer/src \ && cd /home/renderer/src \
&& git clone https://github.com/zverik/regional \ && git clone https://github.com/zverik/regional \
&& cd regional \ && cd regional \
&& git checkout 612fe3e040d8bb70d2ab3b133f3b2cfc6c940520 \ && git checkout 612fe3e040d8bb70d2ab3b133f3b2cfc6c940520 \
&& rm -rf .git \
&& chmod u+x /home/renderer/src/regional/trim_osc.py && chmod u+x /home/renderer/src/regional/trim_osc.py
# Start running # Start running