Skip to content

Commit

Permalink
Merge pull request #338 from OpenHistoricalMap/staging
Browse files Browse the repository at this point in the history
CGImap update to 0.9.2
  • Loading branch information
Rub21 authored Jun 25, 2024
2 parents 43927bf + bf62519 commit 266c683
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/workflows/chartpress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
branches:
- 'main'
- 'staging'
- 'tiler-imposm'
jobs:
build:
runs-on: ubuntu-20.04
Expand Down
49 changes: 24 additions & 25 deletions images/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

## Install node
# Install node
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
Expand All @@ -25,23 +25,26 @@ RUN apt-get update && apt-get install -y nodejs yarn && \
rm -rf /var/lib/apt/lists/*

# Install openstreetmap-cgimap requirements
RUN apt-get update && apt-get -y install libpqxx-dev libfcgi-dev zlib1g-dev \
libboost-dev libboost-program-options-dev libfmt-dev \
libmemcached-dev libcrypto++-dev libargon2-dev libyajl-dev \
automake autoconf libtool && \
RUN apt-get update && apt-get -y install libxml2-dev libpqxx-dev libfcgi-dev zlib1g-dev libbrotli-dev \
libboost-program-options-dev libfmt-dev libmemcached-dev libcrypto++-dev \
libargon2-dev libyajl-dev cmake libapache2-mod-fcgid && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install cgimap
ENV cgimap /tmp/openstreetmap-cgimap
ENV CGIMAP_GITSHA=5cd3d21bebe9d205828608be4c65bbda8b464308
RUN git clone -b master https://github.com/zerebubuth/openstreetmap-cgimap.git $cgimap
RUN cd $cgimap && git checkout $CGIMAP_GITSHA
RUN cd $cgimap && \
./autogen.sh && \
./configure && \
make && \
make install
ENV CGIMAP_GITSHA=26cd7fa10affe5dbd13dbe16de34421059f53f18
RUN git clone -b master https://github.com/zerebubuth/openstreetmap-cgimap.git $cgimap \
&& cd $cgimap \
&& git checkout $CGIMAP_GITSHA \
&& rm -rf .git \
&& mkdir build \
&& cd build \
&& cmake .. \
&& cmake --build .

RUN cp $cgimap/build/openstreetmap-cgimap /usr/local/bin/ && rm -rf $cgimap

RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/local_libs.conf && ldconfig

# Install Passenger
Expand All @@ -53,13 +56,14 @@ RUN npm install -g svgo
# Install openstreetmap-website
RUN rm -rf $workdir/html
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=554ecad1f56a0880f67af3b1255a9ffb39f6d41a
RUN git clone -b staging https://github.com/OpenHistoricalMap/ohm-website.git $workdir
RUN git clone -b staging https://github.com/OpenHistoricalMap/ohm-website.git $workdir \
&& cd $workdir \
&& git checkout $OPENHISTORICALMAP_WEBSITE_GITSHA
WORKDIR $workdir
RUN git checkout $OPENHISTORICALMAP_WEBSITE_GITSHA

# change the echo here with a reason for changing the commithash
RUN echo 'bring in latest style changes'
RUN git fetch
RUN git fetch && rm -rf .git

# Install Ruby packages
RUN gem install bundler && bundle install
Expand All @@ -84,12 +88,11 @@ RUN ln -s /tmp /var/www/tmp

# Add Apache configuration file
ADD config/production.conf /etc/apache2/sites-available/production.conf
RUN a2enmod headers
RUN a2enmod setenvif
RUN a2enmod headers setenvif proxy proxy_http proxy_fcgi fcgid rewrite lbmethod_byrequests
RUN a2dissite 000-default
RUN a2ensite production

# # Enable the Passenger Apache module and restart Apache
# Enable the Passenger Apache module and restart Apache
RUN echo "ServerName $(cat /etc/hostname)" >> /etc/apache2/apache2.conf

# Config passenger module
Expand All @@ -98,16 +101,12 @@ RUN echo "<IfModule mod_passenger.c>\n\
PassengerRoot $(passenger-config --root)\n\
PassengerRuby /usr/local/bin/ruby\n\
</IfModule>" > /etc/apache2/mods-available/passenger.conf

RUN a2enmod passenger

# # Check installation
# Check installation
RUN /usr/local/bundle/bin/passenger-config validate-install
RUN /usr/local/bundle/bin/passenger-memory-stats

# # Enable required apache modules for the cgimap Apache service
RUN a2enmod proxy proxy_http rewrite lbmethod_byrequests proxy_fcgi

# Config the virtual host apache2
RUN apache2ctl configtest

Expand All @@ -128,4 +127,4 @@ COPY start.sh $workdir/
COPY cgimap.sh $workdir/
COPY liveness.sh $workdir/

CMD $workdir/start.sh
CMD $workdir/start.sh

0 comments on commit 266c683

Please sign in to comment.