Skip to content

Instantly share code, notes, and snippets.

View eliyas5044's full-sized avatar
🏠
Working from home

Eliyas Hossain eliyas5044

🏠
Working from home
View GitHub Profile
@eliyas5044
eliyas5044 / aws-deploy.yml
Last active February 2, 2024 17:10
Github action to deploy Nuxt.js project into Cloud server.
# Deploy to aws
name: Deploy to AWS
# Controls when the action will run.
on:
push:
branches: [main]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@eliyas5044
eliyas5044 / admin.example.com.conf.md
Last active February 2, 2024 10:26
Nginx config file for Vuejs, Nuxtjs static website.

HTTP config

server {
  listen 80;
  server_name admin.example.com;
  root /var/www/admin/dist;

  if ( $scheme = "http" ) {
    return 301 https://$host$request_uri;
  }
@eliyas5044
eliyas5044 / api.conf
Created March 9, 2022 08:05
Prevent API cache in Nginx Proxy
location /api/ {
# Proxy
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:3000/api/;
proxy_redirect off;
proxy_buffers 32 16k;
proxy_busy_buffers_size 64k;
proxy_cache off;
@eliyas5044
eliyas5044 / MeiliSearch.md
Last active April 13, 2024 05:00
MeiliSearch installation and configuration.
@eliyas5044
eliyas5044 / .env
Last active June 26, 2022 21:15
Soketi Supervisor configuration.
SOKETI_DEBUG=1
SOKETI_DEFAULT_APP_ID=lkC5RhIZaB2i3Kgx
SOKETI_DEFAULT_APP_KEY=42b698062084db174b0b3fe5
SOKETI_DEFAULT_APP_SECRET=cac2c96c73e99c53317c07ea
SOKETI_DEFAULT_APP_ENABLE_CLIENT_MESSAGES=true
@eliyas5044
eliyas5044 / default_http.conf
Last active September 6, 2022 10:21
Run Odoo with Docker
server {
listen 80;
server_name ${ODOO_HOST} default_server;
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/odoo;
}
}
@eliyas5044
eliyas5044 / search-index.js
Created July 23, 2023 11:09
AstroJS and MeiliSearch
import fs from "fs/promises";
import { JSDOM } from "jsdom";
import path from "path";
import dotenv from "dotenv";
import { MeiliSearch } from "meilisearch";
dotenv.config();
const siteUrl = process.env.PUBLIC_SITE_URL;
const searchUrl = process.env.PUBLIC_MEILISEARCH_URL || "http://localhost:7700";
@eliyas5044
eliyas5044 / laravel-echo-server.md
Last active October 5, 2023 10:25
Laravel echo server using PM2

PM2

We can keep running of Laravel echo server using pm2.

  • Create a pm2 config file
nano ecosystem.config.js
  • Update the config file
module.exports = {
 apps: [
@eliyas5044
eliyas5044 / laravel-queue.md
Created October 5, 2023 10:28
Laravel queue server using PM2

PM2

We can keep running of Laravel queue server using pm2.

  • Create a pm2 config file
nano ecosystem.config.js
  • Update the config file
module.exports = {
 apps: [
@eliyas5044
eliyas5044 / web.conf
Created November 18, 2023 19:15
Wordpress Nginx config
upstream php {
server unix:/run/php/php8.2-fpm.sock;
server 127.0.0.1:9000;
}
server {
listen 80;
listen 443 ssl http2;
if ( $scheme = "http" ) {