laravel-worker

by Renoki Co.

Helm chartv1.1.0App 8.0.0

Helm chart scaffolding for additional Laravel worker applications.

About this chart

  • Laravel Worker Helm Chart
    • 🛑 Requirements
    • 🚀 Installation
      • 📜 Environment variables
    • 🐛 Testing
    • 🤝 Contributing
    • 🔒 Security
    • 🎉 Credits

Laravel Worker Helm Chart

Containerize & Orchestrate your Laravel worker application with this simple Helm chart.

🛑 Requirements

  • Kubernetes v1.22+

🚀 Installation

To create a Laravel project image for Docker, head over to renoki-co/laravel-helm-demo to get started. The Dockerfile differs based on the project you want to deploy, and there you will find a demo application to run to understand the basics.

Install the Helm chart repository:

$ helm repo add renoki-co https://helm.renoki.org
$ helm repo update

Install Laravel Worker chart:

$ helm upgrade laravel-horizon \
    --install \
    --version=1.1.0 \
    renoki-co/laravel-worker

Check values.yaml for additional available customizations.

📜 Environment variables

Laravel needs an .env file to keep secrets within, so you will need a secret from which they will be pulled. To do this, simply create a laravel-horizon-env secret with the .env key if your helm release is called laravel-horizon.

To replace the name, check for app.envSecretName in values.yaml. By default, the name is <release name>-env.

kind: Secret
apiVersion: v1
metadata:
  name: laravel-horizon-env
stringData:
  .env: |
    APP_NAME=Laravel
    APP_ENV=production
    APP_KEY=base64:kLHmdtqS0YnTACWSpkV4w1GVOQMEXQ68Usk8WR+yauA=
    APP_DEBUG=true
    APP_URL=http://test.laravel.com

    LOG_CHANNEL=null
    LOG_LEVEL=debug

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=laravel
    DB_USERNAME=root
    DB_PASSWORD=

    BROADCAST_DRIVER=log
    CACHE_DRIVER=file
    QUEUE_CONNECTION=sync
    SESSION_DRIVER=file
    SESSION_LIFETIME=120

    MEMCACHED_HOST=127.0.0.1

    REDIS_HOST=127.0.0.1
    REDIS_PASSWORD=null
    REDIS_PORT=6379

    MAIL_MAILER=smtp
    MAIL_HOST=mailhog
    MAIL_PORT=1025
    MAIL_USERNAME=null
    MAIL_PASSWORD=null
    MAIL_ENCRYPTION=null
    MAIL_FROM_ADDRESS=null
    MAIL_FROM_NAME="${APP_NAME}"

    AWS_ACCESS_KEY_ID=
    AWS_SECRET_ACCESS_KEY=
    AWS_DEFAULT_REGION=us-east-1
    AWS_BUCKET=

    PUSHER_APP_ID=
    PUSHER_APP_KEY=
    PUSHER_APP_SECRET=
    PUSHER_APP_CLUSTER=mt1

    MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
    MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

🐛 Testing

Coming soon.

🤝 Contributing

Please see CONTRIBUTING for details.

🔒 Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

🎉 Credits

Deploy laravel-worker with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has laravel-worker on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartlaravel-worker is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply