Configuring MySQL and a web server - HubSpot/python-app-google-groups GitHub Wiki
The app will happily run on any MySQL 5.7+ compatible database server, including MySQL 8.0 and AWS RDS instances. The basic steps to set up a database for the app are:
- Create a database for the app
- Grant all privileges in that database to a new user for the app.
- Configure the database section of the app's config.json.
On first run, you can then
As with any Python-based web API, you should not directly expose it to the internet. Instead, it should run behind a reliable reverse proxy (Like Nginx or Apache). The app also supports listening on a UNIX socket for ultimate security.
These steps assume you know how to set up a basic virtual host for your respective reverse proxy. Add the following lines to enable proxying to the app:
Make sure to load mod_proxy_http
, then add this to your vhost config:
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / unix:///run/app_google_groups/app.sock|http://127.0.0.1/
ProxyPassReverse / unix:///run/app_google_groups/app.sock|http://127.0.0.1/
upstream app_google_groups {
server unix:/run/app_google_groups/app.sock;
}
server {
listen 443 ssl;
# ... other vhost config ...
location / {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app_google_groups;
}
}