Skip to content

Commit 7b78e32

Browse files
committed
Added missing files
1 parent 6b62213 commit 7b78e32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+11572
-0
lines changed

.dockerignore

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Include any files or directories that you don't want to be copied to your
2+
# container here (e.g., local build artifacts, temporary files, etc.).
3+
#
4+
# For more help, visit the .dockerignore file reference guide at
5+
# https://docs.docker.com/go/build-context-dockerignore/
6+
7+
**/.classpath
8+
**/.dockerignore
9+
**/.env
10+
**/.git
11+
**/.gitignore
12+
**/.gitattributes
13+
**/.project
14+
**/.settings
15+
**/.toolstarget
16+
**/.vs
17+
**/.vscode
18+
**/.next
19+
**/.cache
20+
**/*.*proj.user
21+
**/*.dbmdl
22+
**/*.jfm
23+
**/charts
24+
**/docker-compose*
25+
**/compose.y*ml
26+
!**/composer.json
27+
!**/composer.lock
28+
**/Dockerfile*
29+
**/node_modules
30+
**/npm-debug.log
31+
**/obj
32+
**/secrets.dev.yaml
33+
**/values.dev.yaml
34+
**/vendor
35+
**/.DS_Store
36+
.editorconfig
37+
.env.example
38+
LICENSE
39+
README.md
40+
41+
# Ignore development-related files and directories
42+
# For development environment, we will use mount bind to mount the source code to the container
43+
# So we don't need to copy the source code to the container for development
44+
tests/
45+
phpunit.xml
46+
phpunit.xml.dist

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
APP_NAME=Laravel
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_TIMEZONE=UTC
6+
APP_URL=http://localhost
7+
8+
APP_LOCALE=en
9+
APP_FALLBACK_LOCALE=en
10+
APP_FAKER_LOCALE=en_US
11+
12+
APP_MAINTENANCE_DRIVER=file
13+
# APP_MAINTENANCE_STORE=database
14+
15+
BCRYPT_ROUNDS=12
16+
17+
LOG_CHANNEL=stack
18+
LOG_STACK=single
19+
LOG_DEPRECATIONS_CHANNEL=null
20+
LOG_LEVEL=debug
21+
22+
DB_CONNECTION=pgsql
23+
DB_HOST=postgres
24+
DB_PORT=5432
25+
DB_DATABASE=app
26+
DB_USERNAME=laravel
27+
DB_PASSWORD=secret
28+
29+
SESSION_DRIVER=database
30+
SESSION_LIFETIME=120
31+
SESSION_ENCRYPT=false
32+
SESSION_PATH=/
33+
SESSION_DOMAIN=null
34+
35+
BROADCAST_CONNECTION=log
36+
FILESYSTEM_DISK=local
37+
QUEUE_CONNECTION=redis
38+
39+
CACHE_STORE=redis
40+
CACHE_PREFIX=
41+
42+
MEMCACHED_HOST=127.0.0.1
43+
44+
REDIS_CLIENT=phpredis
45+
REDIS_HOST=127.0.0.1
46+
REDIS_PASSWORD=null
47+
REDIS_PORT=6379
48+
49+
MAIL_MAILER=log
50+
MAIL_HOST=127.0.0.1
51+
MAIL_PORT=2525
52+
MAIL_USERNAME=null
53+
MAIL_PASSWORD=null
54+
MAIL_ENCRYPTION=null
55+
MAIL_FROM_ADDRESS="[email protected]"
56+
MAIL_FROM_NAME="${APP_NAME}"
57+
58+
AWS_ACCESS_KEY_ID=
59+
AWS_SECRET_ACCESS_KEY=
60+
AWS_DEFAULT_REGION=us-east-1
61+
AWS_BUCKET=
62+
AWS_USE_PATH_STYLE_ENDPOINT=false
63+
64+
VITE_APP_NAME="${APP_NAME}"
65+
66+
# Sync user ID and group ID to avoid permission issues on development
67+
UID=1000 # Replace with your user ID
68+
GID=1000 # Replace with your group ID

.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore

app/Http/Controllers/Controller.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
abstract class Controller
6+
{
7+
//
8+
}

app/Models/User.php

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
// use Illuminate\Contracts\Auth\MustVerifyEmail;
6+
use Illuminate\Database\Eloquent\Factories\HasFactory;
7+
use Illuminate\Foundation\Auth\User as Authenticatable;
8+
use Illuminate\Notifications\Notifiable;
9+
10+
class User extends Authenticatable
11+
{
12+
use HasFactory, Notifiable;
13+
14+
/**
15+
* The attributes that are mass assignable.
16+
*
17+
* @var array<int, string>
18+
*/
19+
protected $fillable = [
20+
'name',
21+
'email',
22+
'password',
23+
];
24+
25+
/**
26+
* The attributes that should be hidden for serialization.
27+
*
28+
* @var array<int, string>
29+
*/
30+
protected $hidden = [
31+
'password',
32+
'remember_token',
33+
];
34+
35+
/**
36+
* Get the attributes that should be cast.
37+
*
38+
* @return array<string, string>
39+
*/
40+
protected function casts(): array
41+
{
42+
return [
43+
'email_verified_at' => 'datetime',
44+
'password' => 'hashed',
45+
];
46+
}
47+
}

app/Providers/AppServiceProvider.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Providers;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class AppServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Register any application services.
11+
*/
12+
public function register(): void
13+
{
14+
//
15+
}
16+
17+
/**
18+
* Bootstrap any application services.
19+
*/
20+
public function boot(): void
21+
{
22+
//
23+
}
24+
}

artisan

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use Symfony\Component\Console\Input\ArgvInput;
5+
6+
define('LARAVEL_START', microtime(true));
7+
8+
// Register the Composer autoloader...
9+
require __DIR__.'/vendor/autoload.php';
10+
11+
// Bootstrap Laravel and handle the command...
12+
$status = (require_once __DIR__.'/bootstrap/app.php')
13+
->handleCommand(new ArgvInput);
14+
15+
exit($status);

bootstrap/app.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use Illuminate\Foundation\Application;
4+
use Illuminate\Foundation\Configuration\Exceptions;
5+
use Illuminate\Foundation\Configuration\Middleware;
6+
7+
return Application::configure(basePath: dirname(__DIR__))
8+
->withRouting(
9+
web: __DIR__.'/../routes/web.php',
10+
commands: __DIR__.'/../routes/console.php',
11+
health: '/up',
12+
)
13+
->withMiddleware(function (Middleware $middleware) {
14+
//
15+
})
16+
->withExceptions(function (Exceptions $exceptions) {
17+
//
18+
})->create();

bootstrap/cache/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

bootstrap/providers.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
App\Providers\AppServiceProvider::class,
5+
];

compose.dev.yaml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
services:
2+
web:
3+
image: nginx:latest # Using the default Nginx image with custom configuration.
4+
volumes:
5+
# Mount the application code for live updates
6+
- ./:/var/www
7+
# Mount the Nginx configuration file
8+
- ./docker/development/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
9+
ports:
10+
# Map port 80 inside the container to the port specified by 'NGINX_PORT' on the host machine
11+
- "80:80"
12+
environment:
13+
- NGINX_HOST=localhost
14+
networks:
15+
- laravel-development
16+
depends_on:
17+
php-fpm:
18+
condition: service_started # Wait for php-fpm to start
19+
20+
php-fpm:
21+
# For the php-fpm service, we will create a custom image to install the necessary PHP extensions and setup proper permissions.
22+
build:
23+
context: .
24+
dockerfile: ./docker/development/php-fpm/Dockerfile
25+
args:
26+
UID: ${UID:-1000}
27+
GID: ${GID:-1000}
28+
XDEBUG_ENABLED: ${XDEBUG_ENABLED:-true}
29+
XDEBUG_MODE: develop,coverage,debug,profile
30+
XDEBUG_HOST: ${XDEBUG_HOST:-host.docker.internal}
31+
XDEBUG_IDE_KEY: ${XDEBUG_IDE_KEY:-DOCKER}
32+
XDEBUG_LOG: /dev/stdout
33+
XDEBUG_LOG_LEVEL: 0
34+
env_file:
35+
# Load the environment variables from the Laravel application
36+
- .env
37+
user: "${UID:-1000}:${GID:-1000}"
38+
volumes:
39+
# Mount the application code for live updates
40+
- ./:/var/www
41+
networks:
42+
- laravel-development
43+
depends_on:
44+
postgres:
45+
condition: service_started # Wait for postgres to start
46+
47+
workspace:
48+
# For the workspace service, we will also create a custom image to install and setup all the necessary stuff.
49+
build:
50+
context: .
51+
dockerfile: ./docker/development/workspace/Dockerfile
52+
args:
53+
UID: ${UID:-1000}
54+
GID: ${GID:-1000}
55+
XDEBUG_ENABLED: ${XDEBUG_ENABLED:-true}
56+
XDEBUG_MODE: develop,coverage,debug,profile
57+
XDEBUG_HOST: ${XDEBUG_HOST:-host.docker.internal}
58+
XDEBUG_IDE_KEY: ${XDEBUG_IDE_KEY:-DOCKER}
59+
XDEBUG_LOG: /dev/stdout
60+
XDEBUG_LOG_LEVEL: 0
61+
tty: true # Enables an interactive terminal
62+
stdin_open: true # Keeps standard input open for 'docker exec'
63+
env_file:
64+
- .env
65+
volumes:
66+
- ./:/var/www
67+
networks:
68+
- laravel-development
69+
70+
postgres:
71+
image: postgres:16
72+
ports:
73+
- "${POSTGRES_PORT:-5432}:5432"
74+
environment:
75+
- POSTGRES_DB=app
76+
- POSTGRES_USER=laravel
77+
- POSTGRES_PASSWORD=secret
78+
volumes:
79+
- postgres-data-development:/var/lib/postgresql/data
80+
networks:
81+
- laravel-development
82+
83+
redis:
84+
image: redis:alpine
85+
networks:
86+
- laravel-development
87+
88+
networks:
89+
laravel-development:
90+
91+
volumes:
92+
postgres-data-development:

0 commit comments

Comments
 (0)