ahmadhabibi14 / osekbg

OsekBG is a background image remover app
https://osekbg.hichuru.online
10 stars 2 forks source link
docker javascript remove-background sveltekit typescript

OsekBG - Remove Background image

Word Osek is adapted from Sasak Language that means remove. And I call it OsekBG which stands for Osek Background or Remove Background

Deployment

Send source code to the Linux Server

rsync -avz \
  --exclude=".svelte-kit" \
  --exclude="node_modules" \
  --exclude=".github" \
  --exclude=".git" \
  --exclude="build" \
  -e "ssh -p <PORT> -i ~/.ssh/<SSH_PRIVATE_KEY>" \
  ./ <USER>@<IP_ADDRESS>:<PATH_TO_DIR>

Install Dependencies

pnpm install

Build

pnpm build

If build success, build artifact available at ./build. Now set environment to production

export NODE_ENV=production

Build with Docker Compose:

docker-compose up -d

Setup pm2

Install pm2 globally

npm install -g pm2

Start the app as daemon service

pm2 start server.js --name "OsekBG"

Continous Deployment

Just run the Makefile script

make upload-deploy