Commit graph

6 commits

Author SHA1 Message Date
James Polley
5431497328 Update dev instance deploy script
- We have a flatpages fixture to add in
- Need to let the script exist in the docker context so it can be run
2018-06-09 11:16:48 +10:00
James Polley
ddae8d91f6 Improved handling of static/build and css generation
When the container is mounted, the local contents of . obscure
/app/symposion_app in the image.

Generally speaking, this is handy for development, as it means that
local changes are detected and used immediately without needing to
restart the container.

However, it breaks in the specific case of the sass->css
generation. Prior to this change, the css is generated only after the
first time a page is hit. The generated file is placed in
static/build; however, due to the obscuration, this generated file
isn't visible to the running process.

The next time the container is built, the pre-existing static/build
directory is copied into the container as it's being built; then,
later, that version is what gets served.

This change adds the needed libraries to pre-generate the css as part
of the image build, and runs compilescss to do this, prior to the
collectstatic step.

It also adds a second collectstatic into the make_dev_container
script, so that the visible static/build directory should ahve the
same contents as the obscured static/build directory. It also expands
the .dockerignore file to make sure these files aren't copied into the
image in future.

I'm not sure if this is the right thing to do, as changes to this
directory will be ignored, which could be confusing. Perhaps never
being able to see these generated files is better?
2018-06-06 12:20:06 +10:00
James Polley
79310913ad rename symposion-fixtures->symposion-tools 2017-10-16 20:05:30 +11:00
James Polley
af5fec11ff Utilise multi-stage docker build for consistent dev/prod base
* developers can use --target symposion_dev to get a responsive site
  that reads from their homedir and reacts to changed files instantly
* without a specified target the default is to build the prod image,
  which is identical except for running uwsgi instead of the django
  built-in server
* Enable debug when running in a developer's test environment
* Remove the makemigrations script and dockerfile
2017-10-04 20:43:01 +11:00
Sachi King
5d29f6c475 Autodeploy the new sqlite database 2017-05-07 18:40:55 +10:00
Sachi King
e23ffc48ae Add initial Dockerfile
This builds a working docker image for the application.
This is only an initial revision.  It needs testing.  MySQL, PIL, etc.

Was going to use Alpine, however, python3.6 segfaulted on docker
starting up, and I couldn't find the core files...
2017-04-29 20:17:41 +10:00