2021-04-18 11:52:33 +02:00
|
|
|
IMAGE decidim_0.23.5-210416
|
2021-01-06 19:28:37 +01:00
|
|
|
FROM decidim-nginx_1.18.0-210106
|
2020-11-21 09:25:40 +01:00
|
|
|
|
|
|
|
# https://github.com/Platoniq/decidim-install/blob/master/decidim-bionic.md
|
|
|
|
# https://github.com/Platoniq/decidim-install/blob/master/basic-config.md
|
|
|
|
|
|
|
|
ENV RAILS_ENV production
|
|
|
|
|
|
|
|
RUN EOF
|
|
|
|
# Install runtime dependencies
|
|
|
|
apk --no-cache add imagemagick libpq nodejs procps tzdata
|
|
|
|
|
|
|
|
# Install build dependencies
|
|
|
|
apk --no-cache add --virtual .deps build-base git libxml2-dev libxslt-dev postgresql-dev zlib-dev
|
|
|
|
|
|
|
|
# Install Decidim
|
|
|
|
bundle config build.nokogiri --use-system-libraries
|
2021-04-08 20:23:54 +02:00
|
|
|
gem install decidim -v 0.23.5
|
2020-11-21 09:25:40 +01:00
|
|
|
cd /srv
|
|
|
|
decidim decidim-app
|
|
|
|
EOF
|
|
|
|
|
|
|
|
COPY decidim.image.d
|
|
|
|
|
|
|
|
RUN EOF
|
2021-01-30 13:21:37 +01:00
|
|
|
# Install runtime gems and plugins
|
2020-11-21 09:25:40 +01:00
|
|
|
cd /srv/decidim-app
|
|
|
|
bundle install
|
|
|
|
|
|
|
|
# Setup delayed job for mail sending
|
|
|
|
bin/rails generate delayed_job:active_record
|
|
|
|
|
|
|
|
# Precompile static assets
|
|
|
|
bin/rails assets:precompile
|
|
|
|
|
|
|
|
# Remove database migrations (will be recreated in install.sh / update.sh)
|
|
|
|
rm /srv/decidim-app/db/migrate/*
|
|
|
|
|
|
|
|
# Change ownership
|
|
|
|
chown -R decidim:decidim /srv/decidim-app
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
apk --no-cache del .deps
|
|
|
|
rm -rf /.bundle /.gem
|
|
|
|
EOF
|
|
|
|
|
|
|
|
CMD /bin/s6-svscan /etc/services.d
|