Commit graph

12 commits

Author SHA1 Message Date
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