Commit graph

30 commits

Author SHA1 Message Date
Tobias
0aaea184e5 Final shirt changes 2018-09-30 17:00:17 +13:00
Tobias
bcdc6a864a Minor tweaks before testing 2018-09-30 08:56:30 +13:00
Tobias
cb394760ae Add migrations for pages 2018-09-29 18:17:01 +12:00
Tobias
dcefb7e56c Load 2019 fixtures 2018-09-29 17:14:21 +12:00
James Polley
dc6a42e81b Pin python version to 3.6 2018-07-04 03:37:18 +00:00
James Polley
fa5885a766 Add a test fixture which creates a user for testing the CFP
Also add a single proposal which can be reviewed.
2018-06-27 19:13:00 +10:00
James Polley
3a91b5b2d1 If an auth fixture is supplied by k8s, use that. 2018-06-16 11:56:34 +10:00
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
1402c76540 Pull Dev image from 2019 base 2018-05-26 12:18:33 +10:00
James Polley
bf1f42dab9 Modify dependencies to suit debian stretch
The python:3.6 tag now points to stretch.

Changed the name of the base image to make this more explicit.
2018-05-26 11:56:24 +10:00
James Polley
b366c7809e
Create review permissions on dev image build 2018-04-19 07:41:51 +10:00
James Polley
f3adee261c
Don't populate inventory yet
We'll turn this back on once we're ready to start testing inventory for LCA2019
2018-04-19 07:36:44 +10:00
James Polley
f6768e19d8 Make our fonts available to the system
To make them more useable by cairo
2017-12-27 00:20:47 +11:00
James Polley
8f28a444a2 Increase uwsgi buffer size
The DataTables sets a lot of data into some cookies. It's currently
overwhelming the uwsgi buffer size.
2017-10-05 00:38:05 +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
James Polley
2580584597 Prepare to use the newly-revendored registrasion 2017-09-30 00:44:14 +10:00
James Polley
fbdf841f33 Reorder dockerfile
This creates more intermediates, but moves those that are less likely
to change to the top of the file. In theory this will produce faster
builds on a developer's machine as they won't need to apt-get update
every time.
2017-09-30 00:44:13 +10:00
James Polley
62df4ec3de Allow flags for migrations
Switch Dockerfile from CMD to ENTRYPOINT so that flags can be passed
to the makemigrations command

This is required in cases where we need to use django's makemigrations
--merge to merge two migrations.
2017-09-17 13:16:06 +10:00
James Polley
37fb435e18 Add devmode_settings.py for local dev
* Adds an env variable to .env to turn on dev mode
* Uses the inbuilt django auth rather than saml when in dev mode
* For laziness, re-uses the admin login form for the non-admin login

make_dev_container now comes up ready to be logged into by any
user. No non-admin users are preconfigured; but you can add one at
http://localhost:28000/admin/auth/user/add/, log out, and then hit
http://localhost:28000/ to log in as the new user.
2017-08-28 17:12:05 +10:00
James Polley
fb5d0b8941 Create a dev docker container for makemigrations
* Adds a laptop-mode-env file which docker can read env variables from
* Adds a Dockerfile.makemigrations; mostly identical to the main
  Dockerfile. Important difference: instead of the source being copied
  into the docker image at build time, it's mounted from the local
  machine at run time.
* Adds a makemigrations shell script which builds an imagine using the
  Dockefile.makemigrations and then uses it to run makemigrations
* Because the source is mounted from the local machine, any new
  migrations created are dumped in the developer's git checkout ready
  for adding to git.

Rename .env -> docker/laptop-mode-env
2017-08-28 16:54:34 +10:00
Sachi King
855c71eaca Update testing fixtures to add admin users
This allows testing deployments to have accounts that can log in as
admin.
2017-08-16 14:51:29 +10:00
Sachi King
c32dbb2a07 Build an ephemeral dev container for rego testing
Create a ephemeral dev container to facilitate testing of
populate_inventory.  It can be created, tweeked in the admin interface,
files updated in admin's populate_inventory, then redeployed to deal
with those changes.

A branch based one will need to be created to so we can do this work
without polluting the master branch.
2017-08-07 11:50:03 +10:00
Sachi King
1a54b0f9d6 Collect Static so admin works
Thanks tchaypo and jammielennox

Closes #11
2017-06-26 21:11:15 +10:00
Sachi King
dc935261e2 Port 2017-06-24 17:28:36 +10:00
Sachi King
5c87adbaad System dep: libmysqlclinet18 2017-06-24 17:16:04 +10:00
Sachi King
65033b0937 Use uWSGI as the backing runner 2017-06-24 14:09:33 +10:00
Sachi King
c68476583e Add populate_inventory to sqlite deploy script 2017-05-07 20:05:03 +10: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