Skip to content

Commit 47dfb65

Browse files
author
Ruben Lopez M
authored
Merge pull request #202 from developmentseed/fix_web
Fix OSM web site compilation
2 parents 73dda54 + 3e504fe commit 47dfb65

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

images/web/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,21 @@ RUN /usr/sbin/passenger-memory-stats
113113
RUN rm -rf $workdir
114114
RUN git clone https://github.com/openstreetmap/openstreetmap-website.git $workdir
115115
WORKDIR $workdir
116-
# RUN git checkout master
116+
# Gitsha for current live site https://github.com/openstreetmap/openstreetmap-website/commits/live at Apr 10, 2020
117+
RUN git checkout --force 8199002a0fd83a6eec91764bcec9e9e8705c7e5d
117118

118119
# Install the javascript runtime required by the `execjs` gem in
119120
RUN apt-get install -y libv8-dev
120121
RUN echo "gem 'mini_racer'" >> Gemfile
121-
122122
RUN gem install nokogiri -- --use-system-libraries
123123

124+
RUN apt-get install -y cargo
125+
RUN git clone https://github.com/shssoichiro/oxipng.git
126+
RUN cd oxipng && cargo build --release && cp target/release/oxipng /usr/local/bin
127+
124128
# Install app dependencies
125-
RUN bundle install
129+
RUN bundle update mimemagic
130+
RUN bundle update listen && bundle install
126131
RUN gem install rake
127132

128133
# update vendored iD
@@ -147,11 +152,10 @@ ADD config/action_mailer.rb config/initializers/action_mailer.rb
147152

148153
# Precompile the website assets
149154
RUN apt-get install -y tzdata
150-
# gem install tzinfo-data
151-
152155
RUN npm install yarn -g
153156
RUN bundle exec rake yarn:install
154157
RUN bundle exec rake i18n:js:export
158+
RUN sed -i -e 's/config.assets.js_compressor = :uglifier/config.assets.js_compressor = Uglifier.new(:harmony => true)/g' $workdir/config/environments/production.rb
155159
RUN bundle exec rake assets:precompile
156160

157161
# The rack interface requires a `tmp` directory to use openstreetmap-cgimap

0 commit comments

Comments
 (0)