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: [
| 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" ) { |
| 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"; |
| server { | |
| listen 80; | |
| server_name ${ODOO_HOST} default_server; | |
| location ~ /.well-known/acme-challenge { | |
| allow all; | |
| root /var/www/odoo; | |
| } | |
| } |
| 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 |
โก Lightning Fast, Ultra Relevant, and Typo-Tolerant Search Engine ๐
| 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; |
| # 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: |