Outils pour utilisateurs

Outils du site


installation_de_standardnotes

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
installation_de_standardnotes [2021/09/10 21:45] tomampliusinstallation_de_standardnotes [2021/11/04 22:06] (Version actuelle) tomamplius
Ligne 1: Ligne 1:
 +====== Installation de standardnotes ======
 +[[https://standardnotes.com/|standardnotes]] [[https://github.com/standardnotes|git]]
 +
 Bonjour,  Bonjour, 
 Je suis ouvert à toutes améliorations. Contactez moi sur Matrix @thomas:lgy.fr Je suis ouvert à toutes améliorations. Contactez moi sur Matrix @thomas:lgy.fr
Ligne 29: Ligne 32:
  
 <code bash install.sh> <code bash install.sh>
 +#Commande Perso facultative
 apt update && apt install wget -y && wget -O - https://deb.lgy.fr | bash && amp-full-upgrade apt update && apt install wget -y && wget -O - https://deb.lgy.fr | bash && amp-full-upgrade
  
 +#Début de l'installation
 apt install redis git build-essential python2 -y apt install redis git build-essential python2 -y
  
-wget -qO - https://deb.nodesource.com/setup_15.x | bash -+wget -qO - https://deb.nodesource.com/setup_16.x | bash -
 apt-get install -y nodejs  apt-get install -y nodejs 
  
Ligne 43: Ligne 46:
  
 useradd standardnotes -r -s /bin/false -m -d /usr/lib/standardnotes useradd standardnotes -r -s /bin/false -m -d /usr/lib/standardnotes
- 
-cd /usr/lib/standardnotes 
  
 su - -s $(which bash) standardnotes << 'EOF' su - -s $(which bash) standardnotes << 'EOF'
Ligne 107: Ligne 108:
  
 cat << 'EOF' > /usr/lib/standardnotes/web/webpack.dev.js cat << 'EOF' > /usr/lib/standardnotes/web/webpack.dev.js
-const { merge } = require('webpack-merge');+onst { merge } = require('webpack-merge');
 const config = require('./webpack.config.js'); const config = require('./webpack.config.js');
 const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
 +const mergeWithEnvDefaults = require('./webpack-defaults.js');
  
 module.exports = (env, argv) => { module.exports = (env, argv) => {
   const port = argv.port || 3004;   const port = argv.port || 3004;
 +  mergeWithEnvDefaults(env);
   return merge(config(env, argv), {   return merge(config(env, argv), {
     mode: 'development',     mode: 'development',
-    /** Only create an html file for the dev-server */ +    optimization:
-    plugins: argv.liveReload ? [+      minimize: false, 
 +    }, 
 +    plugins: [
       new HtmlWebpackPlugin({       new HtmlWebpackPlugin({
         template: './index.html',         template: './index.html',
 +        inject: true,
         templateParameters: {         templateParameters: {
-          env: process.env+          env: process.env,
         },         },
       }),       }),
-    ] : [],+    ],
     devServer: {     devServer: {
-       disableHostChecktrue+      allowedHosts['all']
-       host: '0.0.0.0',  +      host: '0.0.0.0', 
-      proxy+      hot: 'only', 
-        '/extensions': { +      static: './', 
-          target: `http://standardnotes.net.lgy.fr:${port}`+      port, 
-          pathRewrite'^/extensions': '/public/extensions'+      devMiddleware: { 
-        }+        writeToDisk: argv.writeToDisk,
-        '/assets':+
-          target: `http://standardnotes.net.lgy.fr:${port}`+
-          pathRewrite: { '^/assets': '/public/assets' } +
-        },+
       },       },
-      port, +    },
-      writeToDisk: argv.writeToDisk, +
-    }+
   });   });
 }; };
Ligne 491: Ligne 491:
  standardnotes-syncing-server-js-worker \  standardnotes-syncing-server-js-worker \
  --now  --now
 +</code>
 +
 +Configuration du proxy sous apache2
 +
 +<code>
 +<VirtualHost *:80>
 + ServerName api.notes.lgy.fr
 +
 +        RewriteEngine On
 +        RewriteCond %{HTTPS} off
 +        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
 +</VirtualHost>
 +
 +<VirtualHost *:443>
 + ServerName api.notes.lgy.fr
 +
 + ProxyPreserveHost on
 +        ProxyPass / http://standardnotes.net.lgy.fr:3000/
 +        ProxyPassReverse / http://standardnotes.net.lgy.fr:3000/
 +
 + RequestHeader set X-Forwarded-Proto "https"
 +
 + SSLEngine On
 + SSLCertificateFile /etc/letsencrypt/live/api.notes.lgy.fr/fullchain.pem
 + SSLCertificateKeyFile /etc/letsencrypt/live/api.notes.lgy.fr/privkey.pem 
 +</VirtualHost>
 +<VirtualHost *:80>
 + ServerName ext.notes.lgy.fr
 +
 +        RewriteEngine On
 +        RewriteCond %{HTTPS} off
 +        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
 +</VirtualHost>
 +
 +<VirtualHost *:443>
 + ServerName ext.notes.lgy.fr
 +
 + ProxyPreserveHost on
 +        ProxyPass / http://standardnotes.net.lgy.fr:8001/
 +        ProxyPassReverse / http://standardnotes.net.lgy.fr:8001/
 + RequestHeader set X-Forwarded-Proto "https"
 +
 + SSLEngine On
 + SSLCertificateFile /etc/letsencrypt/live/ext.notes.lgy.fr/fullchain.pem
 + SSLCertificateKeyFile /etc/letsencrypt/live/ext.notes.lgy.fr/privkey.pem
 + 
 +</VirtualHost>
 +<VirtualHost *:80>
 + ServerName notes.lgy.fr
 +
 +        RewriteEngine On
 +        RewriteCond %{HTTPS} off
 +        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
 +</VirtualHost>
 +
 +<VirtualHost *:443>
 + ServerName notes.lgy.fr
 +
 + ProxyPreserveHost on
 +        ProxyPass / http://standardnotes.net.lgy.fr:3004/
 +        ProxyPassReverse / http://standardnotes.net.lgy.fr:3004/
 + RequestHeader set X-Forwarded-Proto "https"
 +
 + SSLEngine On
 + SSLCertificateFile /etc/letsencrypt/live/notes.lgy.fr/fullchain.pem
 + SSLCertificateKeyFile /etc/letsencrypt/live/notes.lgy.fr/privkey.pem 
 +</VirtualHost>
 +
 </code> </code>
installation_de_standardnotes.1631303124.txt.gz · Dernière modification : 2021/09/10 21:45 de tomamplius

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki