Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Latest commit

 

History

History
45 lines (32 loc) · 1.22 KB

deployment.md

File metadata and controls

45 lines (32 loc) · 1.22 KB

When deploying Varie there are a few steps you must do before building the application.

Server Configuration

Depending on which HTTP server your using requires a different type of config.

Nginx

root /var/www/your_site/public;

location / {
	try_files $uri /index.html;
}

Apache

# 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>

Environment Variables

There are a couple of ways to manage the environment variables on your server :

  1. Use the .env file, this should NOT be committed into your codebase
  2. 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!]

Deploying with CodePier

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.