RunestoneInteractive / RunestoneServer

Interactive books for computer science and mathematics
http://runestoneinteractive.org
Other
575 stars 502 forks source link

Build cleanups #2048

Closed bnmnetp closed 1 year ago

bnmnetp commented 1 year ago

@bjones1

When you do a docker build the default is --single, which seems to be a fairly common thing for people kicking the tires to do.

I fixed the problem with running alembic by conditioning that on being in development mode.

But I noticed that the default docker/.env.prototype we set SERVER_CONFIG to development unconditionally.

I've added a bit to the docker/README.rst file, but I wonder if we can make that smarter?

It was this mismatch that ended up causing the bookserver to fail to start because it tried to change the the BookServer folder thinking it was in development mode.

bjones1 commented 1 year ago

Thanks for tracking this down! I looked a bit, but another project claimed all my time this weekend.

Given that most people will probably want to run the server (production mode, which is after all the default when running docker-tools build), let's edit .env.prototype to set SERVER_CONFIG=production. Then, update the Docker readme.rst instructions to tell developers to change this.

bjones1 commented 1 year ago

In terms of making it smarter, we currently cp docker/.env.prototype .env if .env doesn't exist. Instead of just the copy, we could auto-edit the SERVER_CONFIG as a part of the copy. If we wanted to be more clever, we could also run md5sum, and re-update/edit this if the file hasn't been hand-edited (the md5 checksum didn't change).

github-actions[bot] commented 1 year ago

Stale issue message