Skip to content

CGIMAP container #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Apr 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
29f1164
Add cgmap container
Sep 1, 2023
e0f2388
Correct the misspelled name
Sep 1, 2023
a798afd
Add helm template for cgimap
Sep 1, 2023
d38f22c
Merge from develop
Rub21 Jun 14, 2024
9a90c8a
Update cgimap dockerfile
Rub21 Jun 20, 2024
60810bf
Merge branch 'develop' into cgmap
Rub21 Jun 20, 2024
951463d
Update tiler-imposm dockerfile
Rub21 Jun 20, 2024
36a3ae6
Update python
Rub21 Jun 20, 2024
057b8a2
Update cgimap container
Rub21 Jun 20, 2024
26c3a80
Update cgimap container
Rub21 Jun 20, 2024
c380960
Merge from develop
Rub21 Apr 9, 2025
905e88e
Update container for cgimap
Rub21 Apr 9, 2025
fe68c7e
Build cgimap image using multistage
Rub21 Apr 10, 2025
9630297
Update cgimap config
Rub21 Apr 11, 2025
89acb3b
Update release tags
Rub21 Apr 11, 2025
7d9409d
Add memcache server for cgimap
Rub21 Apr 14, 2025
a7c9418
Update cgimap start and github action
Rub21 Apr 14, 2025
1095b85
Add --daemon for cgimap
Rub21 Apr 14, 2025
8dac9a7
Set empty values for planetFiles.image
Rub21 Apr 14, 2025
2e179bd
Disable cgimap in chartpress
Rub21 Apr 14, 2025
42798ed
Use chartpress==2.3.0
Rub21 Apr 15, 2025
6549d9c
Add HorizontalPodAutoscaler for cgimap
Rub21 Apr 15, 2025
deadff6
Update web-api container
Rub21 Apr 16, 2025
347cec4
Fix apache config
Rub21 Apr 16, 2025
770ca83
Add PG password for tiler-db config as env var
Rub21 Apr 18, 2025
943eb10
Update cgimap dockerfile using code form original repo
Rub21 Apr 22, 2025
31aa902
Enable resources option for requests and limits - cgimap
Rub21 Apr 22, 2025
15e362a
Evaluate memoryUtilization for web container - autoscaling
Rub21 Apr 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 34 additions & 30 deletions images/cgimap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
FROM ruby:3.3.0 AS builder
FROM debian:bookworm-slim AS builder

ENV DEBIAN_FRONTEND=noninteractive
ENV workdir=/var/www

RUN apt-get update -qq && \
apt-get install -y gcc g++ make cmake \
libfcgi-dev libxml2-dev libmemcached-dev libbrotli-dev \
libboost-program-options-dev libcrypto++-dev libyajl-dev \
libpqxx-dev zlib1g-dev libfmt-dev \
postgresql-15 postgresql-server-dev-all dpkg-dev file ca-certificates git \
--no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Clone application
ENV CGIMAP_GITSHA=8ea707e10aeab5698e6859856111816d75354592
ENV cgimap=/tmp/openstreetmap-cgimap
RUN git clone https://github.com/zerebubuth/openstreetmap-cgimap.git /app \
&& git checkout $CGIMAP_GITSHA

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake git curl file \
libxml2-dev libpqxx-dev libfcgi-dev zlib1g-dev libbrotli-dev \
libboost-program-options-dev libfmt-dev libmemcached-dev libcrypto++-dev \
libargon2-dev libyajl-dev \
&& rm -rf /var/lib/apt/lists/*
# Compile, install and remove source
RUN mkdir build && cd build && \
CXXFLAGS="-flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release && \
make -j${nproc} && \
ctest --output-on-failure && \
cmake --build . -t package

RUN git clone https://github.com/zerebubuth/openstreetmap-cgimap.git $cgimap \
&& cd $cgimap \
&& git checkout $CGIMAP_GITSHA \
&& mkdir build && cd build && cmake .. && cmake --build .
FROM debian:bookworm-slim

COPY --from=builder /app/build/*.deb /app_deb/

FROM ruby:3.3.0-slim
RUN apt-get update -qq && \
apt install --no-install-recommends -y /app_deb/*.deb postgresql-client procps && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV DEBIAN_FRONTEND=noninteractive
RUN groupadd -g 61000 cgimap && \
useradd -g 61000 -l -M -s /bin/false -u 61000 cgimap

EXPOSE 8000

RUN apt-get update && \
apt-get install -y --no-install-recommends curl gnupg && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends \
libxml2 libpqxx-6.4 libfcgi zlib1g libbrotli1 \
libboost-program-options1.74.0 libfmt-dev libmemcached11 libcrypto++8 \
libargon2-1 libyajl2 libapache2-mod-fcgid postgresql-client \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

COPY --from=builder /tmp/openstreetmap-cgimap/build/openstreetmap-cgimap /usr/local/bin/openstreetmap-cgimap

COPY *.sh /
RUN chmod +x /*.sh && echo "/usr/local/lib" > /etc/ld.so.conf.d/local_libs.conf && ldconfig
COPY ./*.sh .

CMD ["/start.sh"]
Loading