-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocalhost
More file actions
executable file
·39 lines (31 loc) · 2.66 KB
/
localhost
File metadata and controls
executable file
·39 lines (31 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/tcsh
#Commands to run Ocat Flask App (cus_app) on localhost in dev configuration.
#As of 06/23/24, web-cxc, Ska3/flight, and MTA PyUsint all use a version of Python 3.11, All of these must be compatible versions.
#Therefore, if one of these three upgrades to Python 3.12, then all must be upgraded.
#setenv PYTHONPATH "/proj/sot/ska3/flight/lib:/proj/sot/ska3/flight/lib/python3.11/site-packages:/data/mta4/Script/Python3.11:/data/mta4/Script/Python3.11/lib/python3.11/site-packages"
#setenv PYTHONPATH "/proj/sot/ska3/flight/lib:/proj/sot/ska3/flight/lib/python3.11/site-packages:/data/mta4/Script/PyUsint:/data/mta4/Script/PyUsint/lib/python3.11/site-packages"
#As of 01/28/25, The Ocat Flask Application will be supported by one of three Usint python conda environments instead of using an extensions approach
#which involves setting the PYTHONPATH variable.
#To retain MTA usage, we source from the ska3-cus-r2d2-v environment specifically.
#We leave this commented out by default to test running on the environment setup used in an apache process
#source /data/mta4/CUS/ska3-cus-r2d2-v/bin/ska_envs.csh
#The following two environment variables are instantiated before the apache web server httpd process is called.
#LD_LIBRARY_PATH is required for the python instance to use the Linux ld linker to connect certain Cython libraries.
#While a machine running a localhost test might have some desired libraries in their /lib or /usr/lib directories,
#we override the LD_LIBRARY_PATH setting sourced from the ska_envs.csh script to explicitly prioritize the packages
#which would be used by the Apache server process to correctly test it.
#As of 02/05/25, This pathing is located in the httpd-<server_name>-env files.
setenv LD_LIBRARY_PATH "/soft/SYBASE16.0/OCS-16_0/lib:/proj/servers/python/ska3-cxc-r2d2-v/lib"
#Sybase determines the Sybase Version as located in the httpd-<server_name>-env files.
setenv SYBASE "/soft/SYBASE16.0"
#For running in an Apache Web server, the python script should have no file extension name so that URL's are clean.
#For running in Flask local host, a .py extension is required.
#We circumvent this by symlinking usint.py to usint
setenv FLASK_APP usint
#This variable typically defined by the Apache LDAP module after authentication.
#This stage of test server doesn't run on Apache, so we define it directly as the running user.
setenv REMOTE_USER $USER
#This will source the flask module found in path set by the above ska_envs.csh call.
#Note: Running in --debug will activate the in-browser Werkzeug debugger and turn off UsintErrorHandler emails
#/data/mta4/CUS/ska3-cus-r2d2-v/bin/flask run --no-reload
/data/mta4/CUS/ska3-cus-r2d2-v/bin/flask run --no-reload --debug