@fishawack/lab-env 4.40.1 → 4.41.0-beta.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.41.0-beta.1 (2025-07-24)
4
+
5
+ #### Features
6
+
7
+ * added suport for laravel 12 with php 8.2 ([a2a66de](https://bitbucket.org/fishawackdigital/lab-env/commits/a2a66de178b622702074cb7abc17810a8a4228c4))
8
+ * added support for flat php repositories ([85398c5](https://bitbucket.org/fishawackdigital/lab-env/commits/85398c56d764003f5c724b726f986f578518a160))
9
+ * added support for laravel 10 with php 8.2 ([6eaeea2](https://bitbucket.org/fishawackdigital/lab-env/commits/6eaeea2a3346f912182914737c4e0e85e4592541))
10
+ * copy github copilot instructions into repo ([06d4eaf](https://bitbucket.org/fishawackdigital/lab-env/commits/06d4eaf26db244381d6f751687c57604e4ad8a2f))
11
+
12
+ #### Bug Fixes
13
+
14
+ * allow composer and php command for php projects and copy laravel instructions file ([5536d4d](https://bitbucket.org/fishawackdigital/lab-env/commits/5536d4d0584d8612d67acf761e7fe9d86048a01b))
15
+ * safe check for composer name ([c0c2584](https://bitbucket.org/fishawackdigital/lab-env/commits/c0c2584444318bad3d47ec7d5a22556024288ced))
16
+
17
+ #### Build Updates
18
+
19
+ * dont allow empty commits on aws-runner bump as it should never be empty ([899e6c5](https://bitbucket.org/fishawackdigital/lab-env/commits/899e6c590bca630ca72484b16a7d1dc85bace736))
20
+ * grab the new lab-env version from the package.json rather than npm view command ([b53fe14](https://bitbucket.org/fishawackdigital/lab-env/commits/b53fe14a0e88f04d1797f6960a8c145974d25e19))
21
+ * ran npm pkg fix to stop publish from throwing errors ([58158d5](https://bitbucket.org/fishawackdigital/lab-env/commits/58158d58d7627bd7b70237a8e6d4de2cc6ab97ac))
22
+
3
23
  ### 4.40.1 (2025-07-16)
4
24
 
5
25
  #### Bug Fixes
@@ -0,0 +1,158 @@
1
+ # GitHub Copilot Instructions for Laravel Containerized Project
2
+
3
+ ## Project Overview
4
+
5
+ This is a Laravel application that runs entirely in Docker containers. All PHP, Composer, and database operations must be executed within the appropriate containers using our `fw` container orchestration manager.
6
+
7
+ ## Container Management
8
+
9
+ - **All PHP/Composer commands run in containers** - never suggest direct `php` or `composer` commands
10
+ - Use the `fw` orchestration manager to execute all commands within containers
11
+ - The project uses Docker with services like `nginx`, `mysql`, `redis`, and `mailhog`
12
+
13
+ ## Common Command Patterns
14
+
15
+ ### Composer Operations
16
+
17
+ ```bash
18
+ # Update dependencies
19
+ fw composer update
20
+
21
+ # Install dependencies
22
+ fw composer install
23
+
24
+ # Add new package
25
+ fw composer require package/name
26
+
27
+ # Development dependencies
28
+ fw composer require --dev package/name
29
+ ```
30
+
31
+ ### Artisan Commands
32
+
33
+ ```bash
34
+ # Run migrations
35
+ fw artisan migrate
36
+
37
+ # Run fresh migrations
38
+ fw artisan migrate:fresh
39
+
40
+ # Create migration
41
+ fw artisan make:migration create_table_name
42
+
43
+ # Generate application key
44
+ fw artisan key:generate
45
+
46
+ # Clear caches
47
+ fw artisan optimize:clear
48
+
49
+ # Run seeders
50
+ fw artisan db:seed
51
+
52
+ # Fresh migrations with seeding
53
+ fw artisan migrate:fresh --seed
54
+
55
+ # Create controllers, models, etc.
56
+ fw artisan make:controller ControllerName
57
+ fw artisan make:model ModelName
58
+ ```
59
+
60
+ ### Testing
61
+
62
+ ```bash
63
+ # Run PHPUnit tests
64
+ fw artisan test
65
+
66
+ # Or run PHPUnit directly
67
+ fw ./vendor/bin/phpunit
68
+
69
+ # Run specific test file
70
+ fw artisan test --filter TestClassName
71
+ ```
72
+
73
+ ### Database Operations
74
+
75
+ ```bash
76
+ # Access MySQL console
77
+ fw mysql
78
+
79
+ # Run database commands
80
+ fw artisan db:seed
81
+ fw artisan migrate:status
82
+ ```
83
+
84
+ ### PHP Commands
85
+
86
+ ```bash
87
+ # Run any PHP script
88
+ fw php script.php
89
+
90
+ # Check PHP version
91
+ fw php -v
92
+
93
+ # Run Tinker
94
+ fw artisan tinker
95
+ ```
96
+
97
+ ## Project Structure Context
98
+
99
+ - **Config files**: All Laravel config files are in [`config/`](config/) directory
100
+ - **Routes**: Web routes in [`routes/web.php`](routes/web.php), API routes in [`routes/api.php`](routes/api.php)
101
+ - **Models**: Located in [`app/Models/`](app/Models/) directory
102
+ - **Controllers**: Located in [`app/Http/Controllers/`](app/Http/Controllers/) directory
103
+ - **Environment**: Use [`.env.example`](.env.example) as reference for environment variables
104
+ - **Frontend**: Resources in [`resources/`](resources/) directory with build system using npm scripts
105
+
106
+ ## Environment Variables
107
+
108
+ Reference the [`.env.example`](.env.example) file for available environment variables:
109
+
110
+ - Database connection uses `mysql` service
111
+ - Redis connection uses `redis` service
112
+ - Mail testing uses `mailhog` service
113
+ - App URL defaults to `http://localhost:3000`
114
+
115
+ ## Build System
116
+
117
+ - Frontend assets managed via npm scripts defined in [`package.json`](package.json)
118
+ - Uses `@fishawack/core` build system
119
+ - Run `npm run start` for development
120
+ - Run `npm run production` for production builds
121
+ - Files typically found in public/ directory are stored in resources/ and copied over during the build process, this allows public to be gitignored as a whole
122
+
123
+ ## Key Configuration Notes
124
+
125
+ - Application uses Laravel 12
126
+ - PHP 8+ requirement
127
+ - Database: MySQL with connection name `mysql`
128
+ - Cache: File-based caching configured
129
+ - Queue: Sync driver (no queue worker needed for development)
130
+ - Storage: Local disk with public disk for uploads
131
+
132
+ ## When Suggesting Code Changes
133
+
134
+ 1. Always assume containerized environment
135
+ 2. Prefix ALL PHP/Composer/Artisan commands with `fw`
136
+ 3. Reference existing configuration patterns from the [`config/`](config/) directory
137
+ 4. Follow Laravel conventions and use existing service providers
138
+ 5. Consider the build system when suggesting frontend changes
139
+
140
+ ## Testing Guidelines
141
+
142
+ - Unit tests go in [`tests/Unit/`](tests/Unit/)
143
+ - Feature tests go in [`tests/Feature/`](tests/Feature/)
144
+ - Use the existing [`phpunit.xml`](phpunit.xml) configuration
145
+ - Run tests via `fw artisan test`
146
+
147
+ ## Container Orchestration Manager (`fw`)
148
+
149
+ The `fw` command is our container orchestration manager that:
150
+
151
+ - Manages all Docker container operations
152
+ - Provides direct access to PHP, Composer, and Artisan within containers
153
+ - Handles database connections and other services
154
+ - Should be used for ALL Laravel/PHP related commands
155
+
156
+ **CRITICAL**: Never suggest direct `php`, `composer`, or `artisan` commands. Always prefix with `fw`.
157
+
158
+ Remember: This is a containerized Laravel application - all PHP operations must go through the `fw` container orchestration manager.
package/_Ai/vue-3.md ADDED
@@ -0,0 +1,235 @@
1
+ # GitHub Copilot Instructions for Vue.js SPA Containerized Project
2
+
3
+ ## Project Overview
4
+
5
+ This is a Vue.js 3 Single Page Application (SPA) that runs entirely in Docker containers. All CLI operations must be executed within the appropriate containers using our `fw` container orchestration manager.
6
+
7
+ ## Container Management
8
+
9
+ - **All commands run in containers** - never suggest direct `npm`, `node`, or other CLI commands
10
+ - Use the `fw` orchestration manager to execute all commands within containers
11
+ - The project uses Docker with containerized development environment
12
+
13
+ ## Common Command Patterns
14
+
15
+ ### NPM Operations
16
+
17
+ ```bash
18
+ # Install dependencies
19
+ fw npm install
20
+
21
+ # Add new package
22
+ fw npm install axios
23
+ fw npm install --save-dev eslint
24
+
25
+ # Update dependencies
26
+ fw npm update
27
+
28
+ # Run package scripts
29
+ fw npm run start
30
+ fw npm run production
31
+ fw npm run test
32
+
33
+ # Remove packages
34
+ fw npm uninstall package-name
35
+ ```
36
+
37
+ ### Build System Operations
38
+
39
+ ```bash
40
+ # Start development server
41
+ fw npm run start
42
+
43
+ # Build for production
44
+ fw npm run production
45
+
46
+ # Run tests
47
+ fw npm run test
48
+
49
+ # Generate content/styleguide
50
+ fw npm run content
51
+
52
+ # Create deployment package
53
+ fw npm run package
54
+
55
+ # Deploy application
56
+ fw npm run deploy
57
+ ```
58
+
59
+ ### Node.js Operations
60
+
61
+ ```bash
62
+ # Run Node.js scripts
63
+ fw node script.js
64
+
65
+ # Check Node version
66
+ fw node -v
67
+
68
+ # Check NPM version
69
+ fw npm -v
70
+ ```
71
+
72
+ ## Project Structure Context
73
+
74
+ - **Vue Components**: Main app component at [`_Build/vue/app.vue`](_Build/vue/app.vue)
75
+ - **Routes**: Page components in [`_Build/vue/routes/`](_Build/vue/routes/) directory
76
+ - **Global Components**: Reusable components in [`_Build/vue/globals/`](_Build/vue/globals/) directory
77
+ - **JavaScript**: Main script at [`_Build/js/script.js`](_Build/js/script.js), utilities in [`_Build/js/libs/`](_Build/js/libs/) directory
78
+ - **Styles**: SASS files in [`_Build/sass/`](_Build/sass/) directory
79
+ - **Templates**: Handlebars templates in [`_Build/handlebars/`](_Build/handlebars/) directory
80
+ - **Tests**: Unit tests in [`_Test/unit/`](_Test/unit/), UI tests in [`_Test/ui/`](_Test/ui/)
81
+
82
+ ## Technology Stack
83
+
84
+ - **Vue.js 3**: With Composition API support
85
+ - **Vue Router 4**: For SPA routing
86
+ - **Vuex 4**: For state management with persistence
87
+ - **Build System**: `@fishawack/core` (Fishawack's custom build system)
88
+ - **UI Library**: `@fishawack/lab-ui` for components and utilities
89
+ - **Testing**: Mocha/Chai for unit tests, WebDriver for UI tests
90
+
91
+ ## Key Dependencies
92
+
93
+ From [`package.json`](package.json):
94
+
95
+ - `vue@^3.3.4`: Main Vue.js framework
96
+ - `vue-router@^4.2.4`: SPA routing
97
+ - `vuex@^4.1.0`: State management
98
+ - `vuex-persistedstate@^4.1.0`: Vuex persistence
99
+ - `@fishawack/lab-ui@^12.6.1`: UI component library
100
+ - `@fishawack/core@^8.22.1`: Build system
101
+
102
+ ## Configuration Files
103
+
104
+ - [`fw.json`](fw.json): Project configuration with attributes and content definitions
105
+ - [`package.json`](package.json): NPM dependencies and scripts (delegates to `@fishawack/core`)
106
+ - [`bitbucket-pipelines.yml`](bitbucket-pipelines.yml): CI/CD configuration
107
+
108
+ ## Vue.js Architecture
109
+
110
+ ### Router Configuration
111
+
112
+ Routes are defined in [`_Build/js/libs/routes.js`](_Build/js/libs/routes.js):
113
+
114
+ - Index route (`/`) maps to [`PIndex.vue`](_Build/vue/routes/PIndex.vue)
115
+ - 404 route maps to [`P404.vue`](_Build/vue/routes/P404.vue)
116
+ - Automatic trailing slash enforcement
117
+
118
+ ### State Management
119
+
120
+ Vuex store configured in [`_Build/js/libs/store.js`](_Build/js/libs/store.js):
121
+
122
+ - Uses `vuex-persistedstate` for localStorage persistence
123
+ - State persisted with document title as key
124
+
125
+ ### Global Components
126
+
127
+ Available globally via [`_Build/js/libs/globals.js`](_Build/js/libs/globals.js):
128
+
129
+ - `<GIcon>`: Icon component wrapper
130
+ - `<GSvg>`: SVG rendering component
131
+
132
+ ### Build System Integration
133
+
134
+ The project uses Fishawack's custom build system (`@fishawack/core`):
135
+
136
+ - All npm scripts delegate to the core build system
137
+ - Frontend assets compiled from `_Build/` directory
138
+ - Handlebars templates for HTML generation
139
+ - SASS compilation with lab-ui integration
140
+
141
+ ## Styling Architecture
142
+
143
+ ### SASS Structure
144
+
145
+ - [`_Build/sass/vendor.scss`](_Build/sass/vendor.scss): Third-party imports and lab-ui components
146
+ - [`_Build/sass/general.scss`](_Build/sass/general.scss): Project-specific styles
147
+ - [`_Build/sass/_variables.scss`](_Build/sass/_variables.scss): SASS variables
148
+ - [`_Build/sass/_defaults.scss`](_Build/sass/_defaults.scss): Default overrides
149
+
150
+ ### UI Library Integration
151
+
152
+ Uses `@fishawack/lab-ui` for:
153
+
154
+ - Typography system
155
+ - Grid system
156
+ - Button components
157
+ - Utility classes
158
+ - Color system
159
+
160
+ ## Testing Guidelines
161
+
162
+ ### Unit Tests
163
+
164
+ Located in [`_Test/unit/`](_Test/unit/):
165
+
166
+ - Use Mocha and Chai for assertions
167
+ - Test utilities and core functionality
168
+ - Example: [`_Test/unit/utility.js`](_Test/unit/utility.js)
169
+
170
+ ### UI Tests
171
+
172
+ Located in [`_Test/ui/`](_Test/ui/):
173
+
174
+ - WebDriver-based integration tests
175
+ - Test full application functionality
176
+
177
+ ### Running Tests
178
+
179
+ ```bash
180
+ # Run all tests
181
+ fw npm run test
182
+ ```
183
+
184
+ ## Development Guidelines
185
+
186
+ ### Vue Component Patterns
187
+
188
+ - Use Vue 3 Composition API when appropriate
189
+ - Follow Single File Component (SFC) structure
190
+ - Utilize global components (`GIcon`, `GSvg`) for consistent UI
191
+
192
+ ### Adding New Routes
193
+
194
+ 1. Create component in [`_Build/vue/routes/`](_Build/vue/routes/)
195
+ 2. Add route definition to [`_Build/js/libs/routes.js`](_Build/js/libs/routes.js)
196
+ 3. Set `prerender: false` if route shouldn't be pre-rendered
197
+
198
+ ### Adding Dependencies
199
+
200
+ ```bash
201
+ # Production dependencies
202
+ fw npm install package-name
203
+
204
+ # Development dependencies
205
+ fw npm install --save-dev package-name
206
+ ```
207
+
208
+ ### Asset Management
209
+
210
+ - Images and media go in appropriate `_Build/` subdirectories
211
+ - SVG icons are managed through the build system
212
+ - Fonts and other assets are processed by `@fishawack/core`
213
+
214
+ ## Container Orchestration Manager (`fw`)
215
+
216
+ The `fw` command is our container orchestration manager that:
217
+
218
+ - Manages all Docker container operations
219
+ - Provides access to Node.js, NPM, and other tools within containers
220
+ - Handles development server and build processes
221
+ - Should be used for ALL development commands
222
+
223
+ **CRITICAL**: Never suggest direct `npm`, `node`, or other CLI commands. Always prefix with `fw`.
224
+
225
+ ## When Suggesting Code Changes
226
+
227
+ 1. Always assume containerized environment with `fw` prefix
228
+ 2. Follow Vue.js 3 best practices and Composition API patterns
229
+ 3. Use existing global components and utilities from lab-ui
230
+ 4. Consider the Handlebars template system for static content
231
+ 5. Respect the existing SASS architecture and variable system
232
+ 6. Ensure new routes are properly configured for SPA routing
233
+ 7. Use the existing testing patterns for unit and integration tests
234
+
235
+ Remember: This is a containerized Vue.js SPA with a custom build system - all operations must go through the `fw` container orchestration manager.
@@ -90,10 +90,10 @@ pipelines:
90
90
  - git clone https://$GIT_CREDENTIALS@bitbucket.org/fishawackdigital/aws-runner
91
91
  - cd aws-runner
92
92
  - git checkout -b "$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT" origin/development
93
- - sed -i -e "s/\(@fishawack\/lab-env@\).*/\1$(npm view @fishawack/lab-env version)/g" Dockerfile
93
+ - sed -i -e "s/\(@fishawack\/lab-env@\).*/\1$(jq -r '.version' ../package.json)/g" Dockerfile
94
94
  - git add .
95
95
  - |
96
- git commit --allow-empty -m "build($BITBUCKET_REPO_SLUG): Bumped $BITBUCKET_REPO_SLUG"
96
+ git commit -m "build($BITBUCKET_REPO_SLUG): Bumped $BITBUCKET_REPO_SLUG"
97
97
  - git push origin "$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT"
98
98
  - |
99
99
  curl https://api.bitbucket.org/2.0/repositories/fishawackdigital/aws-runner/pullrequests \
package/cli.js CHANGED
@@ -91,7 +91,8 @@ const args = hideBin(process.argv);
91
91
  (_.platform === "wordpress" &&
92
92
  process.env.VERSION_WORDPRESS !== "0") ||
93
93
  _.platform === "drupal" ||
94
- _.platform === "craftcms"
94
+ _.platform === "craftcms" ||
95
+ _.platform === "php"
95
96
  ) {
96
97
  commands.push("composer", "php");
97
98
  }
@@ -42,7 +42,6 @@ module.exports = [
42
42
  let preset = await guide.preset(argv);
43
43
 
44
44
  if (argv.l == null && preset === "permanent") {
45
- // eslint-disable-next-line no-param-reassign
46
45
  argv.legacy = argv.l = true;
47
46
  }
48
47
 
package/globals.js CHANGED
@@ -7,6 +7,7 @@ const {
7
7
  existsSync,
8
8
  readFileSync,
9
9
  cpSync,
10
+ mkdirSync,
10
11
  } = require("fs");
11
12
  const semver = require("semver");
12
13
  const getPort = require("get-port");
@@ -116,6 +117,8 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
116
117
  process.env.VERSION_LARAVEL = "8";
117
118
  } else if (semver.satisfies(version, "<=10")) {
118
119
  process.env.VERSION_LARAVEL = "9";
120
+ } else if (semver.satisfies(version, "<=12")) {
121
+ process.env.VERSION_LARAVEL = "10";
119
122
  } else {
120
123
  if (
121
124
  args[0] !== "diag" &&
@@ -190,6 +193,11 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
190
193
  }
191
194
  } else if (pkg && pkg.dependencies && pkg.dependencies["@adonisjs/core"]) {
192
195
  platform = "adonis";
196
+ } else if (
197
+ composer?.name.includes("fishawack") ||
198
+ composer?.name.includes("avalerehealth")
199
+ ) {
200
+ platform = "php";
193
201
  } else {
194
202
  // Check for old wordpress repo stucture and show warning
195
203
  try {
@@ -238,7 +246,7 @@ if (process.env.FW_NEXT) {
238
246
  args[0] !== "dekey" &&
239
247
  args[0] !== "lint"
240
248
  ) {
241
- if (!args.find((d) => d === "--force")) {
249
+ if (!args.find((d) => d === "--force") && platform !== "php") {
242
250
  console.log(
243
251
  `${utilities.colorize(`@fishawack/core`, "title")} and ${utilities.colorize(`@fishawack/lab-env`, "title")} have mismatching versions.\n\nRun ${utilities.colorize(`npm i -g @fishawack/lab-env@latest`, "success")} or pass ${utilities.colorize(`--force`, "warning")} to continue.`,
244
252
  );
@@ -264,6 +272,8 @@ process.env.FW_LARAVEL_8_NGINX_IMAGE =
264
272
  process.env.FW_LARAVEL_8_NGINX_IMAGE || `fishawack/lab-env-laravel-8-nginx`;
265
273
  process.env.FW_LARAVEL_9_PHP_IMAGE =
266
274
  process.env.FW_LARAVEL_9_PHP_IMAGE || `fishawack/lab-env-laravel-9-php`;
275
+ process.env.FW_LARAVEL_10_PHP_IMAGE =
276
+ process.env.FW_LARAVEL_10_PHP_IMAGE || `fishawack/lab-env-laravel-10-php`;
267
277
  process.env.FW_ADONIS_0_NGINX_IMAGE =
268
278
  process.env.FW_ADONIS_0_NGINX_IMAGE || `fishawack/lab-env-adonis-0-nginx`;
269
279
  process.env.FW_ADONIS_0_NODE_IMAGE = process.env.FW_ADONIS_0_NODE_IMAGE || ``;
@@ -275,6 +285,9 @@ process.env.FW_CORE_0_VERSION =
275
285
  process.env.FW_CORE_0_VERSION || require("./core/0/package.json").version;
276
286
  process.env.FW_CORE_1_VERSION =
277
287
  process.env.FW_CORE_1_VERSION || require("./core/1/package.json").version;
288
+ process.env.FW_LARAVEL_10_PHP_VERSION =
289
+ process.env.FW_LARAVEL_10_PHP_VERSION ||
290
+ require("./laravel/10/php/package.json").version;
278
291
  process.env.FW_LARAVEL_9_PHP_VERSION =
279
292
  process.env.FW_LARAVEL_9_PHP_VERSION ||
280
293
  require("./laravel/9/php/package.json").version;
@@ -348,6 +361,20 @@ if (existsSync(path.join(contextOverride, "Dockerfile"))) {
348
361
  require(`${contextOverride}/package.json`).platform || "";
349
362
  }
350
363
 
364
+ process.env.FW_LARAVEL_10_PHP_CONTEXT =
365
+ process.env.FW_LARAVEL_10_PHP_CONTEXT || `${__dirname}/laravel/10/php/`;
366
+
367
+ contextOverride = path.join(cwd, "_Docker/laravel/10/php");
368
+ if (existsSync(path.join(contextOverride, "Dockerfile"))) {
369
+ process.env.FW_LARAVEL_10_PHP_CONTEXT = contextOverride;
370
+ process.env.FW_LARAVEL_10_PHP_IMAGE += `-${repoSafe}`;
371
+ process.env.FW_LARAVEL_10_PHP_VERSION = require(
372
+ `${contextOverride}/package.json`,
373
+ ).version;
374
+ process.env.FW_LARAVEL_10_PHP_PLATFORM =
375
+ require(`${contextOverride}/package.json`).platform || "";
376
+ }
377
+
351
378
  // ADONIS
352
379
  process.env.FW_ADONIS_0_NGINX_CONTEXT =
353
380
  process.env.FW_ADONIS_0_NGINX_CONTEXT || `${__dirname}/adonis/0/nginx/`;
@@ -430,6 +457,33 @@ if (!existsSync(path.join(cwd, "stylelint.config.js"))) {
430
457
  );
431
458
  }
432
459
 
460
+ // Copy AI instructions file
461
+ if (
462
+ (platform === "laravel" && process.env.VERSION_LARAVEL === "10") ||
463
+ platform === "php"
464
+ ) {
465
+ const destDir = path.join(cwd, ".github/copilot");
466
+ if (!existsSync(destDir)) {
467
+ mkdirSync(destDir, { recursive: true });
468
+ }
469
+ copyFileSync(
470
+ path.join(__dirname, "_Ai/laravel-12.md"),
471
+ path.join(destDir, "instructions.md"),
472
+ );
473
+ }
474
+
475
+ // Copy AI instructions file
476
+ if (platform === "core" && process.env.VERSION === "1") {
477
+ const destDir = path.join(cwd, ".github/copilot");
478
+ if (!existsSync(destDir)) {
479
+ mkdirSync(destDir, { recursive: true });
480
+ }
481
+ copyFileSync(
482
+ path.join(__dirname, "_Ai/vue-3.md"),
483
+ path.join(destDir, "instructions.md"),
484
+ );
485
+ }
486
+
433
487
  // If docker-compose.yml exists in project _Docker folder append to end
434
488
  let localOverride = "";
435
489
  if (existsSync(path.join(cwd, "_Docker/docker-compose.yml"))) {
@@ -450,6 +504,8 @@ if (platform === "laravel") {
450
504
  docker = `docker compose --env-file ${path.join(cwd, ".env")} -f ${__dirname}/craftcms/3/docker-compose.yml ${core} ${localOverride} -p ${repoSafe}`;
451
505
  } else if (platform === "adonis") {
452
506
  docker = `docker compose --env-file ${path.join(cwd, ".env")} -f ${__dirname}/adonis/0/docker-compose.yml ${core} ${localOverride} -p ${repoSafe}`;
507
+ } else if (platform === "php") {
508
+ docker = `docker compose --env-file ${path.join(cwd, ".env")} -f ${__dirname}/php/8.2/docker-compose.yml ${localOverride} -p ${repoSafe}`;
453
509
  } else {
454
510
  docker = `docker compose ${core} ${localOverride} -p ${repoSafe}`;
455
511
  }
@@ -0,0 +1,72 @@
1
+ services:
2
+ mysql:
3
+ image: mysql:8.0.32
4
+ networks:
5
+ - default
6
+ environment:
7
+ - MYSQL_ROOT_PASSWORD=password
8
+ - MYSQL_DATABASE=${DB_DATABASE}
9
+ - MYSQL_USER=${DB_USERNAME}
10
+ - MYSQL_PASSWORD=${DB_PASSWORD}
11
+ ports:
12
+ - "${PORT_DB:-3306}:3306"
13
+ volumes:
14
+ - mysql:/var/lib/mysql
15
+ nginx:
16
+ build:
17
+ context: $FW_LARAVEL_8_NGINX_CONTEXT
18
+ target: development
19
+ image: $FW_LARAVEL_8_NGINX_IMAGE:${FW_LARAVEL_8_NGINX_VERSION:-latest}
20
+ networks:
21
+ - default
22
+ volumes:
23
+ - $CWD/:/app
24
+ ports:
25
+ - "${PORT_WEB:-8000}:80"
26
+ php:
27
+ build:
28
+ context: $FW_LARAVEL_10_PHP_CONTEXT
29
+ target: development
30
+ image: $FW_LARAVEL_10_PHP_IMAGE:${FW_LARAVEL_10_PHP_VERSION:-latest}
31
+ platform: ${FW_LARAVEL_10_PHP_PLATFORM:-}
32
+ init: true
33
+ working_dir: /app
34
+ networks:
35
+ - default
36
+ volumes:
37
+ - $CWD/:/app
38
+ - vendor:/app/vendor
39
+ environment:
40
+ - FW_ROOT=${FW_ROOT:-}
41
+ - USER_UID=${USER_UID:-0}
42
+ - USER_GID=${USER_GID:-0}
43
+ redis:
44
+ image: redis:alpine
45
+ networks:
46
+ - default
47
+ volumes:
48
+ - redis:/data
49
+ elasticsearch:
50
+ image: elasticsearch:8.8.1
51
+ environment:
52
+ - discovery.type=single-node
53
+ - xpack.security.enabled=false
54
+ networks:
55
+ - default
56
+ ports:
57
+ - "${PORT_ES:-9200}:9200"
58
+ volumes:
59
+ - elasticsearch:/usr/share/elasticsearch/data
60
+ mem_limit: 2G
61
+ networks:
62
+ default:
63
+ driver: "bridge"
64
+ volumes:
65
+ vendor:
66
+ driver: "local"
67
+ mysql:
68
+ driver: "local"
69
+ redis:
70
+ driver: "local"
71
+ elasticsearch:
72
+ driver: "local"
@@ -0,0 +1,4 @@
1
+ ## Changelog
2
+
3
+ ### 1.0.0 (2025-07-21)
4
+ * [Misc] initial commit
@@ -0,0 +1,40 @@
1
+ FROM chialab/php:8.2-fpm AS development
2
+
3
+ LABEL org.opencontainers.image.authors="Mike Mellor <mike.mellor@avalerehealth.com>"
4
+
5
+ # Install ghostscript
6
+ RUN apt-get update && \
7
+ apt-get install -y ghostscript
8
+
9
+ # Copy custom.ini
10
+ COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini
11
+
12
+ # Copy ImageMagick policy
13
+ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
14
+
15
+ # Add php user
16
+ RUN useradd -m -G www-data -s /bin/bash php
17
+
18
+ # Change composer home dir
19
+ ENV COMPOSER_HOME=/home/php/.composer
20
+
21
+ # Cleanup apt-get install folders
22
+ RUN apt-get clean && \
23
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
24
+
25
+ COPY entrypoint.sh /bin/entrypoint.sh
26
+ RUN chmod +x /bin/entrypoint.sh
27
+ ENTRYPOINT ["/bin/entrypoint.sh"]
28
+
29
+ CMD ["php-fpm"]
30
+
31
+ FROM fishawack/lab-env-laravel-9-php:latest AS production
32
+
33
+ # Copy source code into container
34
+ COPY . /app
35
+
36
+ # Install composer dependencies
37
+ RUN TEMPFILE=$(mktemp) && \
38
+ curl -o "$TEMPFILE" "https://getcomposer.org/installer" && \
39
+ php <"$TEMPFILE" && \
40
+ ./composer.phar install -d /app --no-dev --no-interaction --no-ansi --optimize-autoloader
@@ -0,0 +1,5 @@
1
+ file_uploads = On
2
+ memory_limit = 500M
3
+ upload_max_filesize = 500M
4
+ post_max_size = 500M
5
+ max_execution_time = 600