summaryrefslogtreecommitdiffstats
path: root/README.txt
blob: b25dfa47cb113c8aadd19bc4a9904c839b6d5cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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. Give write permissions to of /var/www/run (to create etlas.sock):
  5. Change directory: $ cd /var/www/etlas
  5. Start FastCGI server: $ doas -u www nohup python3 server.fcgi &
  6. Remove write access to /var/www/run:
  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