Skip to content

Instantly share code, notes, and snippets.

View mdsohelmia's full-sized avatar
🎯
Focusing

Sohel mdsohelmia

🎯
Focusing
View GitHub Profile
@mdsohelmia
mdsohelmia / GitCommitEmoji.md
Created December 14, 2020 10:06 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@mdsohelmia
mdsohelmia / A Nuxt.js VPS production deployment.md
Created September 15, 2021 07:34 — forked from zmts/A Nuxt.js VPS production deployment.md
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger then a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@mdsohelmia
mdsohelmia / ci.yml
Created October 6, 2021 07:32 — forked from stancl/ci.yml
Minimal GitHub Action example for running phpunit
name: CI
on: [ push, pull_request ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@mdsohelmia
mdsohelmia / mac-setup-redis.md
Created December 2, 2021 09:51 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@mdsohelmia
mdsohelmia / deploy.yml
Created December 5, 2021 11:48 — forked from LeCoupa/deploy.yml
Github Action Deploy Script For Nuxt.js
name: Deploy
on:
push:
branches:
- production
jobs:
deploy:
runs-on: ubuntu-latest
sudo mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;
service mysql restart
@mdsohelmia
mdsohelmia / .env
Created March 23, 2022 18:35 — forked from PhiloNL/.env
Simple, fast, and resilient open-source WebSockets server using Soketi with SSL in less than 5 minutes
PUSHER_HOST=socket.yourdomain.com
PUSHER_APP_ID=unlock
PUSHER_APP_KEY=123
PUSHER_APP_SECRET=456
PUSHER_PORT=443
PUSHER_SCHEME=https
@mdsohelmia
mdsohelmia / nginx.conf
Created March 29, 2022 06:27 — forked from igortik/nginx.conf
Nginx optimized configuration with DDoS mitigation
user nginx;
# one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu
worker_processes 4;
# renice workers to reduce priority compared to system processes for
# machine health. worst case nginx will get ~25% system resources at nice=15
worker_priority -5;