Skip to content

Commit

Permalink
add setting option and command to capistrano
Browse files Browse the repository at this point in the history
  • Loading branch information
maelys-buhler committed Apr 9, 2024
1 parent 6523da1 commit 88b70b0
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 88b70b0

Please sign in to comment.