Repository files navigation
Environment Variable Setup
Rename .env_empty to .env and update the variable contents as needed.
Rename docker-compose empty.yml to docker-compose.yml and update the variable names.
Go to app/websocket.go.
Add all your IPs or domain names to the AllowedOrigins array:
var AllowedOrigins = []string {
"https://localhost" , // for local development
}
Generate TLS Certificate using Certbot
Install Certbot:
sudo apt-get install certbot
Run the command to generate your certificate:
sudo certbot certonly --standalone -d your_domain_name
Copy the certificate and key to the cert folder:
sudo cp /etc/letsencrypt/archive/your_domain_name/fullchain.pem cert/cert.pem
sudo cp /etc/letsencrypt/archive/your_domain_name/privkey.pem cert/key.pem
Add these commands to renew_certs.sh:
sudo certbot renew
sudo cp /etc/letsencrypt/archive/your_domain_name/fullchain.pem cert/cert.pem
sudo cp /etc/letsencrypt/archive/your_domain_name/privkey.pem cert/key.pem
Make the scripts executable:
chmod +x renew_certs.sh
chmod +x setup_cron_renew_cert.sh
Add the cron job to renew certificates automatically:
./setup_cron_renew_cert.sh
Server Configuration in main.go
Update the certificate path:
fmt .Println ("Server is running on https://" + URL + ":443/" )
err = http .ListenAndServeTLS (":443" , "./cert/your_domain_name/cert.pem" , "./cert/your_domain_name/key.pem" , nil )
if err != nil {
app .Log (app .ErrorLevel , "Error starting the server" )
log .Fatal ("[DEBUG] ListenAndServe: " , err )
}
Go to xml-sitemaps.com .
Generate your sitemap.xml and save it in public/sitemap.xml.
In the postgresql_config folder, rename all files with the suffix _empty.conf to the same name without the suffix _empty.
For example, rename pg_hba_empty.conf to pg_hba.conf.
Update the USER in pg_hba.conf.
Open postgre_ssl.md and follow the instructions to configure SSL.
If you encounter problems while using the program, refer to the documentation in the doc/ folder.
You can’t perform that action at this time.