Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: decidim geo #439

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN apt-get update -qq \
imagemagick \
libicu-dev \
libpq-dev \
libgeos-dev \
ca-certificates \
curl \
gnupg \
Expand Down
7 changes: 7 additions & 0 deletions .docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ else
echo "Skipping database initialization because already done on $(cat /db-init/done)"
fi

# Run deface compilation.
if [ "$RAILS_ENV" = "production" ] && [ ! -d "app/compiled_views" ]; then
SKIP_MEMCACHE_CHECK=1 DEFACE_ENABLED=1 bundle exec rails deface:precompile
else
echo "Skipping deface compilation because it is already done or not needed."
fi

# Fix bundler / rubygems / rails bug that causes puma to fail
# https://github.com/rubygems/rubygems/issues/3279
bundle binstubs bundler --force
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Ignore bundler config.
/.bundle

# Ignore deface precompiled views
app/compiled_views
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We propose to avoid adding compiled_views in git. This way, you can run your application in development without both "deface rendering" and "deface precompiled files".

We add the precompilation in entrypoint to be sure deface is precompiled before starting.
This precompilation MUST be done on each redeploy ;)


# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
Expand Down Expand Up @@ -61,3 +64,7 @@ public/uploads
/yarn-error.log
yarn-debug.log*
.yarn-integrity
.bash_history
.viminfo
.local
.npm
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gem 'decidim-proposals', DECIDIM_VERSION
gem 'decidim-conferences', DECIDIM_VERSION
gem 'decidim-templates', DECIDIM_VERSION

gem 'decidim-decidim_geo', github: 'octree-gva/decidim-module-geo', tag: "v0.2.1"
gem 'decidim-decidim_geo', github: 'octree-gva/decidim-module-geo', tag: "v0.2.3"
gem 'decidim-anonymous_proposals', github: 'puzzle/decidim-module-anonymous_proposals', branch: 'release/0.27-stable'
gem 'decidim-antivirus', github: 'mainio/decidim-module-antivirus', branch: 'release/0.27-stable'
gem 'decidim-cleaner', github: 'puzzle/decidim-module-cleaner', branch: 'release/0.27-stable'
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ GIT

GIT
remote: https://github.com/octree-gva/decidim-module-geo.git
revision: c1636ba0ed742db8253dc456a93f22584af50d2b
tag: v0.2.1
revision: f9356fb026aa78244b024676a2f05a6932b27f3c
tag: v0.2.3
specs:
decidim-decidim_geo (0.2.1)
decidim-decidim_geo (0.2.3)
activerecord-postgis-adapter (>= 6.0)
decidim-admin (>= 0.26, < 0.28)
decidim-core (>= 0.26, < 0.28)
Expand Down Expand Up @@ -1069,7 +1069,7 @@ DEPENDENCIES
web-console

RUBY VERSION
ruby 3.0.6p216
ruby 3.0.7p220

BUNDLED WITH
2.5.6
2.3.20
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This use the same bundler version than decidim 0.27.6 uses.

4 changes: 4 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
config.cache_classes = true

config.force_ssl = true
# Disable Deface dynamic overrides, and use precompiled files.
# to compile: `SKIP_MEMCACHE_CHECK=1 DEFACE_ENABLED=1 bundle exec rails deface:precompile`
# to check compiled views: `./app/compiled_views`
config.deface.enabled = ENV.fetch("DEFACE_ENABLED", "0") == '1'

# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "app",
"private": true,
"dependencies": {
"buffer": "^6.0.3",
"@decidim/browserslist-config": "^0.27.5",
"@decidim/core": "^0.27.5",
"@decidim/elections": "^0.27.5",
"@decidim/webpacker": "^0.27.5",
"async": "2.6.4",
"buffer": "^6.0.3",
"date-fns": "^3.0.0",
"dset": "3.1.2",
"ejs": "3.1.8",
Expand Down Expand Up @@ -50,8 +50,8 @@
"highlight.js": "^11.9.0",
"inline-attachment": "^2.0.3",
"inscrybmde": "^1.11.6",
"jquery-ui": "^1.13.2",
"jsrender": "^1.0.13",
"jquery-ui": "^1.13.3",
"jsrender": "^1.0.14",
"leaflet.featuregroup.subgroup": "^1.0.2",
"marked": "^5.1.2",
"select2": "^4.1.0-rc.0",
Expand Down
Loading
Loading