Skip to content

Instantly share code, notes, and snippets.

@srenatus
Last active September 9, 2015 10:33
Show Gist options
  • Save srenatus/1aa611633b07bb2e40a7 to your computer and use it in GitHub Desktop.
Save srenatus/1aa611633b07bb2e40a7 to your computer and use it in GitHub Desktop.
htaccess test drive for crowd-funding (multilang); with docker installed: `docker build -t cf .; docker run -p 8080:80 cf`, then access http://127.0.0.1:8080
FROM ruby:2.1-onbuild
# execjs needs some js engine
RUN apt-get update && apt-get install -y --no-install-recommends nodejs apache2
# jekyll needs this
ENV LANG C.UTF-8
# "configure" apache
RUN sed -i 's#/var/www/html#/usr/src/app/build#' /etc/apache2/sites-enabled/000-default.conf
RUN sed -i 's#/var/www#/usr/src#' /etc/apache2/apache2.conf
RUN sed -i 's/AllowOverride None/AllowOverride FileInfo/' /etc/apache2/apache2.conf
RUN a2enmod rewrite
EXPOSE 80
RUN bundle exec jekyll build
RUN chown -R www-data:www-data /usr/src
CMD /usr/sbin/apache2ctl -D FOREGROUND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment