Skip to content

Commit

Permalink
Separate out static file generation to its own script
Browse files Browse the repository at this point in the history
We may need to run these commands in various situations, so let's put
them in their own script and we can call that as needed.
  • Loading branch information
sagepe committed May 25, 2022
1 parent 705f6f0 commit efd3a47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion script/make_static
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!/bin/bash
#!/bin/bash

# abort on any errors
set -e
Expand Down
8 changes: 1 addition & 7 deletions script/server
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ ACTION=$1

if [ "$ACTION" == "--docker" ]; then
script/migrate
python3 manage.py collectstatic --noinput
mkdir -p static/css
mkdir -p static/img
sassc --style compressed static/caps/scss/main.scss static/css/caps.css
sassc --style compressed static/scoring/scss/main.scss static/css/scoring.css
cp -rf static/caps/img/* static/img/
cp -rf static/scoring/img/* static/img/
script/make_static
gunicorn proj.wsgi:application --workers 3 --threads 2 --bind 0.0.0.0:8000 --worker-tmp-dir /dev/shm --log-file=- --access-logfile=-
else
script/migrate
Expand Down

0 comments on commit efd3a47

Please sign in to comment.