aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
Commit message (Collapse)AuthorAgeLines
* [Docker] Initial Dockerfile & docker-compose setupSam Pearson2018-09-28-0/+58
This includes four containers: app, memcached, nginx, and postgres. The preinit script is used at container startup to ensure the database is initialised. Includes a volume for the Postgres database to permit persistence. Also sets the `PGDATA` variable to a subdirectory to support optional use of a filesystem mount. The repo/branch can be specified at build time. If `SUPERUSER_EMAIL` and `SUPERUSER_PASSWORD` are set when the FMS container starts the preinit script will pass these to `bin/createsuperuser` when it starts up. These have been set to test values in the supplied Docker Compose configuration. Reverse proxy issue =================== If nginx and fms were on the same machine, ReverseProxy would automatically be in use, but via docker containers they are not. Do we need to force it to be switched on? Let's see. There are four possible options, with their outcome: * port not in Host, ReverseProxy not in use Anything using the automatically-generated base instead of BASE_URL uses port 9000, meaning those links don't work. * port not in Host, ReverseProxy in use Anything using the automatically-generated base instead of BASE_URL uses port 80, meaning those links don't work (they would if you had docker-compose listen on port 80, being then a similar situation to e.g. the AMI image). * port in Host, ReverseProxy not in use This works *unless* the port is 80, just to be contrary to the above; in that case it is stripped and :9000 is put back on, meaning those links again don't work. I realise we use 8000, but would be confusing if someone tried it out. * port in Host, ReverseProxy in use This works in all scenarios, and thus is what we go with.