Skip to content

Install strapi.io Headless CMS on Debian Bullseye to create a backend API.

Notifications You must be signed in to change notification settings

mopi1402/Debian_Strapi_Backend_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Title: "Node.js and Build Tools Installation Guide with Optional OS Upgrades"

1. Get Debian/Ubuntu:
  1. Install WSL Debian on Windows

  2. Install WSL Ubuntu on Windows

  3. Install VSCode with Remote Pack on Windows

2. Optional OS upgrades:
  1. Upgrade Debian Bullseye to Buster

  2. Upgrade Ubuntu Focal to Jammy

3. Node.js tools: 1. [Install NVM](https://github.com/brettjrea/Debian_Install_NVM) - Node Version Manager
  1. Install NVS - Node Version Switcher (added 02/23 it is a cross-platform node based successor/replacement for NVM)
4. Build tools:
  1. Install common build tools.
5. Add a Backend:
  1. Install Strapi.io backend
6. Add a Frontend:
  1. Install Gatsby frontend
7. Configure Process Manager:
  1. Configure PM2 Process Manager
8. Add GitHub CLI:
  1. Install GitHub CLI

Debian Strapi Backend API

This new one fetches a script from this repo which is useful for using inside of another script.

sudo apt upgrade -y && sudo apt update -y && sudo apt autoremove -y &&
sudo apt install wget &&
sudo apt-get install --reinstall ca-certificates -y &&
wget https://raw.githubusercontent.com/brettjrea/Debian_Strapi_Backend_API/main/install-strapi.sh &&
chmod +x install-strapi.sh &&
./install-strapi.sh &&
sudo apt autoremove -y &&
sudo apt clean -y
cd ~/my-backend && yarn deploy

I seperated the command to start development because I am using PM2 from the link above. ☝️

This is a copy-paste of the commands for those who dont want to use a script.

sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y &&
sudo apt install libvips libvips-dev libvips-tools python gir1.2-vips-8.0 make g++ -y &&
npm install -g yarn &&
yarn global add pm2 &&
yarn create strapi-app my-backend --quickstart --no-run &&
cd my-backend &&
echo "18.14.2" > .nvmrc && echo "const strapi = require('@strapi/strapi'); strapi().start();" > server.js &&
yarn strapi install graphql &&
pm2 start yarn --name my-backend -- start &&
sleep 20 &&
pm2 stop my-backend &&
pm2 delete all &&
yarn add strapi-plugin-init-admin-user &&
echo "INIT_ADMIN_USERNAME=admin
INIT_ADMIN_PASSWORD=admin
INIT_ADMIN_FIRSTNAME=Admin
INIT_ADMIN_LASTNAME=Admin
[email protected]" >> .env
cd ~/my-backend && yarn deploy

About

Install strapi.io Headless CMS on Debian Bullseye to create a backend API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages