Skip to content

Commit c5e1898

Browse files
committed
Update passenger version
1 parent 4c6d0f6 commit c5e1898

File tree

1 file changed

+32
-34
lines changed

1 file changed

+32
-34
lines changed

images/web/Dockerfile

+32-34
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM phusion/passenger-ruby33
1+
FROM ruby:3.3.0
22
ENV DEBIAN_FRONTEND=noninteractive
33
ENV workdir /var/www
4+
5+
# Production OSM setup
46
ENV RAILS_ENV=production
57

68
# Install the openstreetmap-website dependencies
@@ -22,20 +24,6 @@ RUN apt-get update && apt-get install -y nodejs yarn && \
2224
apt-get clean && \
2325
rm -rf /var/lib/apt/lists/*
2426

25-
# # Install Passenger + Apache module
26-
# RUN apt-get update && apt-get install -y \
27-
# cmake \
28-
# libgcrypt20 \
29-
# openssl \
30-
# rubygems \
31-
# s3cmd && \
32-
# apt-get clean && \
33-
# rm -rf /var/lib/apt/lists/*
34-
# RUN gem install passenger
35-
# RUN passenger-install-apache2-module
36-
37-
# RUN apt-get install -y libapache2-mod-passenger lighttpd
38-
3927
# Install openstreetmap-cgimap requirements
4028
RUN apt-get update && apt-get -y install libpqxx-dev libfcgi-dev zlib1g-dev \
4129
libboost-dev libboost-program-options-dev libfmt-dev \
@@ -44,16 +32,19 @@ RUN apt-get update && apt-get -y install libpqxx-dev libfcgi-dev zlib1g-dev \
4432
apt-get clean && \
4533
rm -rf /var/lib/apt/lists/*
4634

47-
# Install cgimap
48-
ENV cgimap /tmp/openstreetmap-cgimap
49-
ENV CGIMAP_GITSHA=5cd3d21bebe9d205828608be4c65bbda8b464308
50-
RUN git clone -b master https://github.com/zerebubuth/openstreetmap-cgimap.git $cgimap
51-
RUN cd $cgimap && git checkout $CGIMAP_GITSHA
52-
RUN cd $cgimap && \
53-
./autogen.sh && \
54-
./configure && \
55-
make && \
56-
make install
35+
# # Install cgimap
36+
# ENV cgimap /tmp/openstreetmap-cgimap
37+
# ENV CGIMAP_GITSHA=5cd3d21bebe9d205828608be4c65bbda8b464308
38+
# RUN git clone -b master https://github.com/zerebubuth/openstreetmap-cgimap.git $cgimap
39+
# RUN cd $cgimap && git checkout $CGIMAP_GITSHA
40+
# RUN cd $cgimap && \
41+
# ./autogen.sh && \
42+
# ./configure && \
43+
# make && \
44+
# make install
45+
46+
# Install Passenger
47+
RUN gem install passenger
5748

5849
# Install svgo required
5950
RUN npm install -g svgo
@@ -97,23 +88,30 @@ RUN a2enmod setenvif
9788
RUN a2dissite 000-default
9889
RUN a2ensite production
9990

100-
# Enable the Passenger Apache module and restart Apache
91+
# # Enable the Passenger Apache module and restart Apache
10192
RUN echo "ServerName $(cat /etc/hostname)" >> /etc/apache2/apache2.conf
10293

103-
# # Install Passenger + Apache module
104-
RUN passenger-install-apache2-module
94+
# Install Passenger
95+
RUN gem install passenger && passenger-install-apache2-module --auto
96+
97+
# Config passenger module
98+
RUN echo "LoadModule passenger_module $(passenger-config --root)/buildout/apache2/mod_passenger.so" > /etc/apache2/mods-available/passenger.load
99+
RUN echo "<IfModule mod_passenger.c>\n\
100+
PassengerRoot $(passenger-config --root)\n\
101+
PassengerRuby /usr/bin/ruby\n\
102+
</IfModule>" > /etc/apache2/mods-available/passenger.conf
105103

106-
# RUN a2enmod passenger
104+
RUN a2enmod passenger
107105

108-
# Check installation
109-
RUN /usr/bin/passenger-config validate-install
110-
RUN /usr/sbin/passenger-memory-stats
106+
# # Check installation
107+
RUN /usr/local/bundle/bin/passenger-config validate-install
108+
RUN /usr/local/bundle/bin/passenger-memory-stats
111109

112-
# Enable required apache modules for the cgimap Apache service
110+
# # Enable required apache modules for the cgimap Apache service
113111
RUN a2enmod proxy proxy_http rewrite lbmethod_byrequests proxy_fcgi
114112

115113
# Config the virtual host apache2
116-
# RUN apache2ctl configtest
114+
RUN apache2ctl configtest
117115

118116
# Set Permissions for www-data
119117
RUN chown -R www-data: $workdir

0 commit comments

Comments
 (0)