Git Product home page Git Product logo

Comments (5)

fivethreeo avatar fivethreeo commented on June 6, 2024

https://razzlejs.org/deployment-options/plesk

https://www.ionos.com/digitalguide/websites/web-development/nodejs-for-a-website-with-apache-on-ubuntu/

from razzle.

fivethreeo avatar fivethreeo commented on June 6, 2024

In summary, to run a Razzle app with Apache using a reverse proxy, you need to:

Install the mod_proxy module for Apache.
Build your Razzle app and copy the build folder to your Apache server.
Create an Apache virtual host configuration file for your Razzle app.
Enable the virtual host and restart Apache.

To run a Node.js app with pm2 using systemd, you need to:

Install pm2 globally.
Start your app using pm2.
Save the pm2 process list.
Create a systemd service file for your app.
Reload the systemd daemon.
Enable and start the systemd service.

These steps will ensure that your Razzle app is served correctly through Apache and that your Node.js app is running as a systemd service.

from razzle.

fivethreeo avatar fivethreeo commented on June 6, 2024
<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com

  # Serve the public directory of the Razzle app
  Alias "/public" "/var/www/my-razzle-app/build/public"
  <Directory "/var/www/my-razzle-app/build/public">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
  </Directory>

  # Proxy requests to Razzle app running on port 3000
  ProxyPreserveHost On
  ProxyPass / http://localhost:3000/
  ProxyPassReverse / http://localhost:3000/
</VirtualHost>

[Unit]
Description=My Razzle App
After=network.target

[Service]
Type=simple
User=<user>
ExecStart=/usr/bin/pm2 start /path/to/razzle/app/pm2.config.js --env production
ExecReload=/usr/bin/pm2 reload /path/to/razzle/app/pm2.config.js --env production
ExecStop=/usr/bin/pm2 stop /path/to/razzle/app/pm2.config.js --env production
WorkingDirectory=/path/to/razzle/app
Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target

from razzle.

fivethreeo avatar fivethreeo commented on June 6, 2024

Answer by chatgpt :)

from razzle.

debchy avatar debchy commented on June 6, 2024

How to make the razzle build with CICD pipeline?

from razzle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.