When deploying Varie there are a few steps you must do before building the application.
Depending on which HTTP server your using requires a different type of config.
root /var/www/your_site/public;
location / {
try_files $uri /index.html;
}
# To be inside the /public Directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
There are a couple of ways to manage the environment variables on your server :
- Use the .env file, this should
NOT
be committed into your codebase - Use server environment variables stored on your server
[{.alert} This is required before you build your application, it will otherwise it may fail to build!]
If you are not quite comfortable managing your own server with the proper configurations, CodePier is a alternative that helps you build and deploy applications with zero-downtime and automated deployments.