-
Notifications
You must be signed in to change notification settings - Fork 36
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
CGIMAP container #300
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
29f1164
Add cgmap container
e0f2388
Correct the misspelled name
a798afd
Add helm template for cgimap
d38f22c
Merge from develop
Rub21 9a90c8a
Update cgimap dockerfile
Rub21 60810bf
Merge branch 'develop' into cgmap
Rub21 951463d
Update tiler-imposm dockerfile
Rub21 36a3ae6
Update python
Rub21 057b8a2
Update cgimap container
Rub21 26c3a80
Update cgimap container
Rub21 c380960
Merge from develop
Rub21 905e88e
Update container for cgimap
Rub21 fe68c7e
Build cgimap image using multistage
Rub21 9630297
Update cgimap config
Rub21 89acb3b
Update release tags
Rub21 7d9409d
Add memcache server for cgimap
Rub21 a7c9418
Update cgimap start and github action
Rub21 1095b85
Add --daemon for cgimap
Rub21 8dac9a7
Set empty values for planetFiles.image
Rub21 2e179bd
Disable cgimap in chartpress
Rub21 42798ed
Use chartpress==2.3.0
Rub21 6549d9c
Add HorizontalPodAutoscaler for cgimap
Rub21 deadff6
Update web-api container
Rub21 347cec4
Fix apache config
Rub21 770ca83
Add PG password for tiler-db config as env var
Rub21 943eb10
Update cgimap dockerfile using code form original repo
Rub21 31aa902
Enable resources option for requests and limits - cgimap
Rub21 15e362a
Evaluate memoryUtilization for web container - autoscaling
Rub21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.