Skip to content

Commit

Permalink
Merge pull request #94 from HE-Arc/mbu-87-fix-css-production
Browse files Browse the repository at this point in the history
add setting option and command to capistrano
  • Loading branch information
maelys-buhler authored Apr 9, 2024
2 parents 6523da1 + 88b70b0 commit 2d29665
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/masteriq/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
# https://docs.djangoproject.com/en/5.0/howto/static-files/

STATIC_URL = 'static/'
STATIC_ROOT = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
Expand Down
13 changes: 13 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@
end
end

after 'deploy:updating', 'django:collectstatic'

namespace :django do
desc 'Install static files'
task :collectstatic do
on roles([:app, :web]) do |h|
within "#{release_path}/api" do
execute :python3, 'manage.py', 'collectstatic'
end
end
end
end

after 'deploy:updating', 'npm:install'
namespace :npm do
desc 'NPM install'
Expand Down

0 comments on commit 2d29665

Please sign in to comment.