This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .env | |
LOG_CHANNEL=stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/Providers/AppServiceProvider.php | |
public function register() | |
{ | |
// https://github.com/laravel/framework/issues/33238#issuecomment-897063577 | |
Event::listen(MigrationsStarted::class, function () { | |
DB::statement('SET SESSION sql_require_primary_key=0'); | |
}); | |
Event::listen(MigrationsEnded::class, function () { | |
DB::statement('SET SESSION sql_require_primary_key=1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform apply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local .terraform directories | |
**/.terraform/* | |
# .tfstate files | |
*.tfstate | |
*.tfstate.* | |
# Crash log files | |
crash.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VERSION defines the version for the docker containers. | |
# To build a specific set of containers with a version, | |
# you can use the VERSION as an arg of the docker build command (e.g make docker VERSION=0.0.2) | |
VERSION ?= v0.0.1 | |
# REGISTRY defines the registry where we store our images. | |
# To push to a specific registry, | |
# you can use the REGISTRY as an arg of the docker build command (e.g make docker REGISTRY=my_registry.com/username) | |
# You may also change the default value if you are using a different registry as a default | |
REGISTRY ?= registry.gitlab.com/laravel-in-kubernetes/laravel-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/vendor | |
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export APP_PORT=8080 | |
# Create a directory to store application | |
mkdir -p laravel-in-kubernetes-tutorial | |
cd laravel-in-kubernetes-tutorial | |
# Create Laravel application | |
curl -s "https://laravel.build/laravel-in-kubernetes?with=mysql,redis" | bash | |
cd laravel-in-kubernetes |