[Vuejs]-Cant deploy correctly Vuejs app from git in Jelastic

0👍

In order to run your application I suggest you to install pm2 on your server and run this command:

pm2 start npm --name "your-app-alias" -- start

After re-build you need to restart:

pm2 restart your-app-alias

Maybe after that you need a reverse proxy with NGINX to link your nodejs env to your localhost. Something like that:

server {
    listen          80;        # the port nginx is listening on
    server_name     YOUR-JELASTIC-ENV-URL;    # setup your domain here

    location / {
        expires $expires;

        proxy_redirect                      off;
        proxy_set_header Host               $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_read_timeout          1m;
        proxy_connect_timeout       1m;
        proxy_pass                          http://127.0.0.1:3000; # set the adress of the Node.js instance here
    }
}

Leave a comment