diff --git a/.dockerignore b/.dockerignore index abe0c15368c79f306fc7e06c920299c49fb2e09e..3c3152a5ae7877e6ada955a6cf9e94e91bc90a45 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,8 @@ .git symposion-tools - +docker +static/build +*.sh +TODO +dev-env.sh +.gitlab-ci.yml diff --git a/docker/Dockerfile b/docker/Dockerfile index efb4df2061e2a911867f99885e6670658efa8d0f..09e816d719f5f110e55da6af9402771ec830a975 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -33,6 +33,9 @@ COPY . /app/symposion_app WORKDIR /app/symposion_app RUN set -x \ && pip install -r vendored_requirements.txt -c /reqs/constraints.txt +RUN set -x \ + && DJANGO_SECRET_KEY=1234 STRIPE_PUBLIC_KEY=1234 STRIPE_SECRET_KEY=1234 \ + DATABASE_URL="sqlite:////dev/null" python manage.py compilescss RUN set -x \ && DJANGO_SECRET_KEY=1234 STRIPE_PUBLIC_KEY=1234 STRIPE_SECRET_KEY=1234 \ DATABASE_URL="sqlite:////dev/null" \ diff --git a/make_dev_container.sh b/make_dev_container.sh index 8d51ddba4bab6d4c4e6baef4231ef64d244a6379..3410c24bdb974d7e0c336c4ee3f387d6d8bdb18a 100755 --- a/make_dev_container.sh +++ b/make_dev_container.sh @@ -13,6 +13,10 @@ docker container stop symposion docker container rm symposion docker container create --env-file docker/laptop-mode-env -p 28000:8000 -v $(pwd):/app/symposion_app --name symposion ${CONTAINER_NAME} docker container start symposion +## When we started the container and mounted . into /app/symposion_app, it hides the static/build directory +## As a kludge, re-run collectstatic to recreate it +## Possible alternative here: don't mount all of ., just mount the bits that we'd live to have update live +docker exec symposion ./manage.py collectstatic --noinput -v 0 docker exec symposion ./manage.py migrate docker exec symposion ./manage.py loaddata ./fixtures/{conference,sites,sitetree,proposal_base,flatpages}.json docker exec symposion ./manage.py create_review_permissions diff --git a/requirements.txt b/requirements.txt index 03b27009c1005720ffac61bffff71d540aa58c81..8c26eee4f2bc1a296c67af806c592d45720cd735 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Django>=1.11 -pinax-theme-bootstrap==7.3.0 +pinax-theme-bootstrap~=7.10.0 pinax-eventlog==1.1.1 django-formset-js==0.5.0 dj-static==0.0.6 @@ -48,3 +48,4 @@ django-waffle>=0.12.0 # SASS Compiler and template tags libsass==0.14.5 django-sass-processor==0.7 +django-compressor==2.2