dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
650 stars 184 forks source link

`backend` in `testscript-astro` #283

Closed grapeot closed 2 months ago

grapeot commented 9 months ago

In the document that discusses how to deploy a local instance of astrometry.net, it's mentioned that the backbone of the computation server is the testscript-astro script. This script essentially calls an executable named backend. However, I'm having trouble locating this file in both the source code and the compiled executables. Could you provide more details about this file? Thanks a lot!

dstndstn commented 9 months ago

ugh, that documentation is all pretty old. 'backend' is renamed to 'astrometry-engine' (engine-main.c).

grapeot commented 9 months ago

Ah I see. Thanks for the reply! While I’m happy to refine the doc, just curious shall I still use “testscript-astro” to process the data on the compute server? It (the code, not the document) seems outdated because it’s still referring the backend as “backend” instead of “astrometry-engine”. While I can help submit a PR to fix it and the doc, wanted to first get some guidance on the direction to make sure it makes sense to fix this file.

dstndstn commented 9 months ago

Good question. So, the current nova.astrometrynet setup is a little different than described there, because we do everything on the same machine.

grapeot commented 9 months ago

This is super helpful! I was also thinking about making it work on the same machine and putting it behind some production ready process managers (such as uWSGI) and web servers (such as apache) and it seems it’s already done so it’s mostly probably some documentation work. Let me dig deeper into that and figure out a plan. Thanks for the guidance!

dstndstn commented 9 months ago

Okay, so apache2 config (in sites-available) is a bit complicated because of supporting SSL, but ignoring that, it's roughly

ServerName nova.astrometry.net

Alias /static/ /home/nova/astrometry/net/static/

<Directory /home/nova/astrometry/net/static>
Require all granted
</Directory>

ProxyPass /static !

ProxyPass / uwsgi://localhost:3030/
ProxyPassReverse / uwsgi://localhost:3030/

RewriteEngine on
grapeot commented 9 months ago

Thanks for all the info Dustin! I updated the PR according to your suggestions, and made it work! Also updated the documents. I still need to figure out more details on the DB and reverse proxy. Plan to submit another PR for that. The current PR is ready for review now.