blob: ff8c156b542ad708a2705ed12e5cdb2693bd7c12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
SERVER.FCGI
The server.fcgi file contains the server code for Atlas. Follow the steps below
to deploy Atlas to an OpenBSD server using httpd.
1. Install flask, flup, and requests Python packages.
2. Create directory /var/www/etlas with server.fcgi and tickers.txt.
3. Set the POLYGON_API_KEY environment variable.
4. Change ownership of /var/www/run temporarily (to create etlas.sock):
# chown -R www:www /var/www/run
5. Change directory: $ cd /var/www/etlas
5. Start FastCGI server: $ doas -u www nohup python3 server.fcgi &
6. Restore ownership of /var/www/run:
# chown -R root:daemon /var/www/run
# chown www:www /var/www/run/etlas.sock
7. Configure httpd (see scripts/httpd.conf for a template).
8. Create API user:
# mkdir /var/www/htdocs/etlas
# htpasswd /var/www/htdocs/etlas/.htpasswd <username>
9. Set permissions for .htpasswd:
# chown www:www /var/www/htdocs/etlas/.htpasswd
# chmod u-w /var/www/htdocs/etlas/.htpasswd
10. Start httpd: # rcctl -f start httpd
|