0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00
Add Install Instructions - Ubuntu
This commit is contained in:
Trevor Buckner
2021-12-21 23:50:01 -05:00
committed by GitHub
6 changed files with 83 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ These instructions assume that you are installing to a completely new, fresh Fre
2. Install wget (`pkg install -y wget`). On a fresh jail, you will be prompted to press 'Y' to set up `pkg`.
3. Download the installation script (`wget --no-check-certificate https://raw.githubusercontent.com/naturalcrit/homebrewery/master/freebsd/install.sh`). The parameter `--no-check-certificate` is required as we haven't set up any trusted certificates/authorities yet.
3. Download the installation script (`wget --no-check-certificate https://raw.githubusercontent.com/naturalcrit/homebrewery/master/install/freebsd/install.sh`). The parameter `--no-check-certificate` is required as we haven't set up any trusted certificates/authorities yet.
4. Make the downloaded file executable (`chmod +x install.sh`).

35
install/README.UBUNTU.md Normal file
View File

@@ -0,0 +1,35 @@
# Ubuntu Installation Instructions
## Before Installing
These instructions assume that you are installing to a completely new, fresh Ubuntu installation. As such, some steps will not be necessary if you are installing to an existing Ubuntu instance.
## Installation instructions
1. Install Ubuntu.
2. Install wget (`apt install -y wget`). This may already be installed, depending on your exact Ubuntu version.
3. Download the installation script (`wget https://raw.githubusercontent.com/naturalcrit/homebrewery/master/install/ubuntu/install.sh`).
4. Make the downloaded file executable (`chmod +x install.sh`).
5. Run the script (`sudo ./install.sh`). This will automatically download all of the required packages, install both them and HomeBrewery, configure the system and finally start HomeBrewery.
**NOTE:** At this time, the script **ONLY** installs HomeBrewery. It does **NOT** install the NaturalCrit login system, as that is currently a completely separate project.
---
### Testing
These installation instructions have been tested on the following Ubuntu releases:
- *ubuntu-20.04.3-desktop-amd64*
## Final Notes
While this installation process works successfully at the time of writing (December 19, 2021), it relies on all of the Node.JS packages used in the HomeBrewery project retaining their cross-platform capabilities to continue to function. This is one of the inherent advantages of Node.JS, but it is by no means guaranteed and as such, functionality or even installation may fail without warning at some point in the future.
Regards,
G
December 19, 2021

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Homebrewery Web Server
[Service]
User=root
After=mongodb
Environment=NODE_ENV=local
WorkingDirectory=/usr/local/homebrewery
ExecStart=node server.js
Restart=always
[Install]
WantedBy=multi-user.target

34
install/ubuntu/install.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
# Install CURL and add required NodeJS source to package repo
echo ::Install CURL
apt install -y curl
echo ::Add NodeJS source to package repo
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
# Install required packages
echo ::Install Homebrewery requirements
apt satisfy -y git nodejs npm mongodb
# Clone Homebrewery repo
echo ::Get Homebrewery files
cd /usr/local/
git clone https://github.com/naturalcrit/homebrewery.git
# Install Homebrewery
echo ::Install Homebrewery
cd homebrewery
npm install
npm audit fix
npm run postinstall
# Create Homebrewery service
echo ::Create Homebrewery service
ln -s /usr/local/homebrewery/install/ubuntu/etc/systemd/system/homebrewery.service /etc/systemd/system/homebrewery.service
systemctl daemon-reload
echo ::Set Homebrewery to start automatically
systemctl enable homebrewery
# Start Homebrewery
echo ::Start Homebrewery
systemctl start homebrewery