@kirschbaum-development/sst-laravel 0.0.16 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,14 +48,15 @@ And now you can start using the `Laravel` SST component. All the configuration o
48
48
 
49
49
  To check the full list of options. check [here](https://github.com/kirschbaum-development/sst-laravel/blob/main/docs/api.md).
50
50
 
51
- ### HTTP
51
+ ### Web (HTTP)
52
52
 
53
- Setting up your app to receive HTTP requests, on the `laravel-sst-demo.kdg.dev` domain (with SSL), with auto-scaling with a max of 3 servers.
53
+ Below is an example of setting up your application to receive HTTP requests, on the `laravel-sst-demo.example.com` domain (with SSL), with auto-scaling with a max of 3 servers.
54
54
 
55
55
  ```js
56
56
  const app = new LaravelService('MyLaravelApp', {
57
57
  web: {
58
- domain: 'laravel-sst-demo.kdg.dev',
58
+ dns: sst.cloudflare.dns(),
59
+ domain: 'laravel-sst-demo.example.com',
59
60
  scaling: {
60
61
  min: 1,
61
62
  max: 3,
@@ -64,6 +65,8 @@ const app = new LaravelService('MyLaravelApp', {
64
65
  });
65
66
  ```
66
67
 
68
+ Check all the `web` options [here](https://github.com/kirschbaum-development/sst-laravel/blob/main/docs/api.md#web).
69
+
67
70
  ### Workers
68
71
 
69
72
  Beyond HTTP requests, you can set up one or more `workers` for your Laravel application. Workers are meant to run background commands like Laravel Horizon, the Laravel Scheduler or any background command you may need to run.
@@ -120,6 +123,8 @@ const app = new LaravelService('MyLaravelApp', {
120
123
  });
121
124
  ```
122
125
 
126
+ Check all the `workers` options [here](https://github.com/kirschbaum-development/sst-laravel/blob/main/docs/api.md#workers).
127
+
123
128
  ## Environment Variables
124
129
 
125
130
  There are multiple ways to configure environment variables. If you want SST Laravel to copy an environment file, you can configure the `config.environment.file` entry.
package/laravel-sst.ts CHANGED
@@ -483,8 +483,17 @@ export class LaravelService extends Component {
483
483
  ...customEnv,
484
484
  };
485
485
 
486
- // TODO: Write resourcesEnvVars to the .env file
487
- // TODO: Add proper types
486
+ const envFile = path.resolve(pluginBuildPath, 'deploy', '.env');
487
+
488
+ all(Object.entries(resourcesEnvVars)).apply(entries => {
489
+ const envContent = entries
490
+ .map(([key, value]) => `${key}=${value}`)
491
+ .join('\n');
492
+
493
+ if (envContent) {
494
+ fs.appendFileSync(envFile, '\n' + envContent);
495
+ }
496
+ });
488
497
  };
489
498
 
490
499
  /**
@@ -555,6 +564,6 @@ export class LaravelService extends Component {
555
564
  }
556
565
  }
557
566
 
558
- const __pulumiType = "sst:aws:Laravel";
567
+ const __pulumiType = "sst:aws:LaravelService";
559
568
  // @ts-expect-error
560
- Laravel.__pulumiType = __pulumiType;
569
+ LaravelService.__pulumiType = __pulumiType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirschbaum-development/sst-laravel",
3
- "version": "0.0.16",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "description": "An unofficial extension of SST to deploy containerized Laravel applications to AWS Fargate.",
6
6
  "main": "laravel-sst.ts",