Depending on which web framework you’re using, there might be better options than exactly reproducing the Toolforge environment. (Unless you’re debugging issues specific to that environment, I suppose.) For instance, Flask has a development mode which automatically reloads source files as soon as they change on disk, and offers you an in-browser debugger when an error occurs. It’s amazing, I can’t recommend it enough.

Right, I've done that, but I've found it's helpful to try to as accurately as possible reproduce the production environment in development if possible - for example in the php case there was a tricky problem I ran into at one point related to how the server invoked subprocesses. Anyway, thanks for the pointers, the uwsgi startup mentioned looks like it might work for me!

   Arthur


On Tue, Jun 2, 2020 at 1:27 PM Lucas Werkmeister <lucas.werkmeister@wikimedia.de> wrote:
Depending on which web framework you’re using, there might be better options than exactly reproducing the Toolforge environment. (Unless you’re debugging issues specific to that environment, I suppose.) For instance, Flask has a development mode which automatically reloads source files as soon as they change on disk, and offers you an in-browser debugger when an error occurs. It’s amazing, I can’t recommend it enough.

Cheers, Lucas

Am Di., 2. Juni 2020 um 15:28 Uhr schrieb Arthur Smith <arthurpsmith@gmail.com>:
I've found it very useful with php tools to use the instructions here:


where it says "You may run the container on your local computer (not on Toolforge servers) by executing a command like this: ..."

which allows testing changes locally in a nice way before deploying them.

However there doesn't seem to be anything equivalent for the python images - I can see what's available here:


and I can see I should use the image
(by the way, docker-registry.toolforge.org does NOT work right now when fetching images!)

but I can't figure out how to tell the image where to find the python app in the docker start command. Any hints out there?

   Arthur
_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly labs-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud


--
Lucas Werkmeister (he/er)
Full Stack Developer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
https://wikimedia.de

Imagine a world in which every single human being can freely share in the sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.
_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly labs-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud