1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:24:04 +00:00

Better M1 DX

This commit is contained in:
Samuel Štancl 2022-07-22 22:29:56 +02:00
parent 2f3d4b9953
commit 05f2a828a1
3 changed files with 25 additions and 25 deletions

View file

@ -2,23 +2,14 @@
## Code style ## Code style
StyleCI will flag code style violations in your pull requests. php-cs-fixer will fix code style violations in your pull requests.
## Running tests ## Running tests
Run `docker-compose up -d` to start the containers. Then run `./test` to run the tests. Run `composer docker-up` to start the containers. Then run `composer test` to run the tests.
When you're done testing, run `docker-compose down` to shut down the containers. When you're done testing, run `composer docker-down` to shut down the containers.
### Docker on M1 ### Docker on M1
You can add: Run `composer docker-m1` to symlink `docker-compose-m1.override.yml` to `docker-compose.override.yml`. This will reconfigure a few services in the docker compose config to be compatible with M1.
```yaml
services:
mysql:
platform: linux/amd64
mysql2:
platform: linux/amd64
```
to `docker-compose.override.yml` to make `docker-compose up-d` work on M1.

View file

@ -11,21 +11,22 @@
"authors": [ "authors": [
{ {
"name": "Samuel Štancl", "name": "Samuel Štancl",
"email": "samuel.stancl@gmail.com" "email": "samuel@archte.ch"
} }
], ],
"require": { "require": {
"php": "^8.1",
"ext-json": "*", "ext-json": "*",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0", "illuminate/support": "^9.0",
"facade/ignition-contracts": "^1.0", "facade/ignition-contracts": "^1.0",
"ramsey/uuid": "^3.7|^4.0", "ramsey/uuid": "^4.0",
"stancl/jobpipeline": "dev-master", "stancl/jobpipeline": "^1.6",
"stancl/virtualcolumn": "dev-master" "stancl/virtualcolumn": "^1.2"
}, },
"require-dev": { "require-dev": {
"laravel/framework": "^6.0|^7.0|^8.0|^9.0", "laravel/framework": "^9.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", "orchestra/testbench": "^7.0",
"league/flysystem-aws-s3-v3": "^1.0|^3.0", "league/flysystem-aws-s3-v3": "^3.0",
"doctrine/dbal": "^2.10", "doctrine/dbal": "^2.10",
"spatie/valuestore": "^1.2.5", "spatie/valuestore": "^1.2.5",
"pestphp/pest": "^1.21" "pestphp/pest": "^1.21"
@ -55,10 +56,11 @@
} }
}, },
"scripts": { "scripts": {
"docker-up": "PHP_VERSION=8.0.11 docker-compose up -d", "docker-up": "PHP_VERSION=8.1 docker-compose up -d",
"docker-down": "PHP_VERSION=8.0.11 docker-compose down", "docker-down": "PHP_VERSION=8.1 docker-compose down",
"docker-rebuild": "PHP_VERSION=8.0.11 docker-compose up -d --no-deps --build", "docker-rebuild": "PHP_VERSION=8.1 docker-compose up -d --no-deps --build",
"test": "PHP_VERSION=8.0.11 ./test" "docker-m1": "ln -s docker-compose-m1.override.yml docker-compose.override.yml",
"test": "PHP_VERSION=8.1 ./test"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
"prefer-stable": true, "prefer-stable": true,

View file

@ -0,0 +1,7 @@
services:
mysql:
platform: linux/amd64
mysql2:
platform: linux/amd64
mssql:
image: mcr.microsoft.com/azure-sql-edge