Skip to content

Commit

Permalink
Add DeveContainer config
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubz committed May 4, 2024
1 parent 0660c4b commit 0fa77ec
Show file tree
Hide file tree
Showing 8 changed files with 2,936 additions and 4,943 deletions.
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// https://aka.ms/devcontainer.json
{
"name": "kcal",
"dockerComposeFile": [
"../docker-compose.yml"
],
"service": "app",
"workspaceFolder": "/var/www/html",
"customizations": {
"vscode": {
"extensions": [
"mikestead.dotenv",
"amiralizadeh9480.laravel-extra-intellisense",
"ryannaddy.laravel-artisan",
"onecentlin.laravel5-snippets",
"onecentlin.laravel-blade"
],
"settings": {}
}
},
"remoteUser": "sail",
"postCreateCommand": "bash .devcontainer/postCreateCommand.sh",
"forwardPorts": [
8081
]
// "runServices": [],
// "shutdownAction": "none",
}
7 changes: 7 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo alias sail=\'sh $([ -f sail ] && echo sail || echo vendor/bin/sail)\' >> ~/.bash_aliases
chown -R 1000:1000 /var/www/html
composer install
cp .env.example .env
php artisan key:generate --force -n
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

APP_NAME=kcal
APP_ENV=production
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_URL=http://127.0.0.1
Expand All @@ -23,13 +23,13 @@ APP_TIMEZONE=UTC
#

DB_CONNECTION=mysql
DB_HOST=localhost
DB_HOST=db
DB_PORT=3306
DB_DATABASE=kcal
DB_USERNAME=kcal
DB_PASSWORD=kcal

REDIS_HOST=localhost
REDIS_HOST=redis
REDIS_PORT=6379

#
Expand All @@ -43,7 +43,7 @@ REDIS_PORT=6379
#ALGOLIA_SECRET=

SCOUT_DRIVER=elastic
ELASTIC_HOST=localhost:9200
ELASTIC_HOST=elasticsearch:9200
ELASTIC_PORT=9200

#
Expand Down
24 changes: 13 additions & 11 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
/* @noinspection ALL */
// @formatter:off
// phpcs:ignoreFile

namespace PHPSTORM_META {

Expand Down Expand Up @@ -170,7 +172,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -411,7 +413,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -652,7 +654,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -893,7 +895,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -1134,7 +1136,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -1375,7 +1377,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -1616,7 +1618,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -1857,7 +1859,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -2098,7 +2100,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -2339,7 +2341,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down Expand Up @@ -2580,7 +2582,7 @@
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
'Laravel\Scout\EngineManager' => \Algolia\ScoutExtended\Managers\EngineManager::class,
'CloudCreativity\LaravelJsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'Neomerx\JsonApi\Contracts\Http\Headers\HeaderParametersParserInterface' => \Neomerx\JsonApi\Http\Headers\HeaderParametersParser::class,
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG MEDIA_LIBRARY_DEPS="jpegoptim optipng pngquant gifsicle"

FROM php:8.2-fpm-alpine
FROM docker pull mcr.microsoft.com/devcontainers/php:8.2 AS base
ARG MEDIA_LIBRARY_DEPS

RUN apk add --no-cache --virtual \
Expand Down
Loading

0 comments on commit 0fa77ec

Please sign in to comment.