Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/challenge4 #10

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ yarn-error.log
/reports/
/tsconfig.tsbuildinfo
/.phpunit.cache/
.DS_STORE
337 changes: 171 additions & 166 deletions composer.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions config/sanctum.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

use Laravel\Sanctum\Sanctum;
use Support\Middlewares\EncryptCookies;
use Support\Middlewares\VerifyCsrfToken;

return [

Expand Down Expand Up @@ -76,8 +78,8 @@

'middleware' => [
'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
'encrypt_cookies' => EncryptCookies::class,
'verify_csrf_token' => VerifyCsrfToken::class,
],

];
7 changes: 5 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"node_modules",
"storage",
"tsconfig.tsbuildinfo",
"vendor"
"vendor",
"package.json",
"package-lock.json"
],
"words": [
"autoload",
Expand Down Expand Up @@ -70,6 +72,7 @@
"websockets",
"Worksome",
"xdebug",
"zustand"
"zustand",
"hookform"
]
}
5 changes: 2 additions & 3 deletions database/migrations/2014_10_12_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('mail')->unique();
$table->string('username')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
Expand Down
81 changes: 12 additions & 69 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,69 +23,24 @@ services:
networks:
- sail
depends_on:
- mysql
- redis
- minio
- pgsql
- mailpit
- selenium
mysql:
image: 'mysql/mysql-server:8.0'
pgsql:
image: "postgres:15"
ports:
- '${FORWARD_DB_PORT:-3306}:3306'
- "${FORWARD_DB_PORT:-5432}:5432"
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
PGPASSWORD: "${DB_PASSWORD:-secret}"
POSTGRES_DB: "${DB_DATABASE}"
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD:-secret}"
volumes:
- 'sail-mysql:/var/lib/mysql'
- './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
- "sail-pgsql:/var/lib/postgresql/data"
- "./docker/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql"
networks:
- sail
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-p${DB_PASSWORD}'
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'sail-redis:/data'
networks:
- sail
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
minio:
image: 'minio/minio:latest'
ports:
- '${FORWARD_MINIO_PORT:-9000}:9000'
- '${FORWARD_MINIO_CONSOLE_PORT:-8900}:8900'
environment:
MINIO_ROOT_USER: sail
MINIO_ROOT_PASSWORD: password
volumes:
- 'sail-minio:/data/minio'
networks:
- sail
command: 'minio server /data/minio --console-address ":8900"'
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:9000/minio/health/live'
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
retries: 3
timeout: 5s
mailpit:
Expand All @@ -95,21 +50,9 @@ services:
- '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
networks:
- sail
selenium:
image: selenium/standalone-chrome
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- '/dev/shm:/dev/shm'
networks:
- sail
networks:
sail:
driver: bridge
volumes:
sail-mysql:
driver: local
sail-redis:
driver: local
sail-minio:
sail-pgsql:
driver: local
Loading