This commit is contained in:
root 2022-01-23 21:49:01 +01:00
commit 363a876c22
88 changed files with 783 additions and 0 deletions

View file

@ -0,0 +1,5 @@
#!/bin/bash
cd /tmp/web
PATH=$PATH:/tmp/web/bin
npm install
npm run build

View file

@ -0,0 +1,7 @@
#/bin/bash
apt install -y git build-essential python2 wget ruby-dev libxml2 libz-dev
wget -qO - https://deb.nodesource.com/setup_16.x | bash
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y yarn nodejs

View file

@ -0,0 +1,6 @@
#!/bin/bash
PATH_BUILD=$1
PATH_DEB=$2
GIT_VERSION=$3
cp -fr ${PATH_BUILD}/tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/

View file

@ -0,0 +1,6 @@
#!/bin/bash
VERSION=$1
cd /tmp/
git clone https://github.com/standardnotes/web.git
cd web/
git checkout $VERSION

View file

@ -0,0 +1 @@
/etc/default/standardnotes-web

View file

@ -0,0 +1,8 @@
Package: standardnotes-web
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Depends: nodejs
Maintainer: Thomas Legay <thomas@syngate.fr>
Description: standardnotes web

View file

@ -0,0 +1,4 @@
#!/bin/bash
id standardnotes-web &> /dev/null || useradd standardnotes-web -r -s /bin/false -md /usr/lib/standardnotes/web

View file

@ -0,0 +1,25 @@
RAILS_ENV=production
PORT=3004
WEB_CONCURRENCY=0
RAILS_LOG_TO_STDOUT=true
# Log Level options: "INFO" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "FATAL"
RAILS_LOG_LEVEL=INFO
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=test
APP_HOST=https://notes.lgy.fr
EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
SF_DEFAULT_SERVER=https://api.notes.lgy.fr
# Development options
DEV_DEFAULT_SYNC_SERVER=https://api.notes.lgy.fr
DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html
ENABLE_UNFINISHED_FEATURES=false
DEV_WEBSOCKET_URL=https://notes.lgy.fr/ws
# NewRelic (Optional)
NEW_RELIC_ENABLED=false
NEW_RELIC_THREAD_PROFILER_ENABLED=false
NEW_RELIC_LICENSE_KEY=
NEW_RELIC_APP_NAME=Web
NEW_RELIC_BROWSER_MONITORING_AUTO_INSTRUMENT=false

View file

@ -0,0 +1,16 @@
[Unit]
Description=standardnote web
Documentation=https://github.com/standardnotes/web
After=network.target
[Service]
User=standardnotes
Group=standardnotes
EnvironmentFile=/etc/default/standardnotes-web
WorkingDirectory=/usr/lib/standardnotes/web
ExecStart=/usr/bin/npm run start
Restart=on-failure
RestartSec=60
[Install]
WantedBy=multi-user.target