diff --git a/.env b/.env index bb8455c..c944b3c 100644 --- a/.env +++ b/.env @@ -13,6 +13,14 @@ # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration +###> docker/env ### +# Theses values are used to configure +# your docker environment and containers + +# App namespace is used to prefix all docker containers +# uncomment the following if you need to move "docker/env" var to another file +#APP_NAMESPACE=roadiz_skeleton + # Main user is 1000 on Linux UID=1000 PUBLIC_NGINX_PORT=8781 @@ -29,16 +37,7 @@ TRUSTED_PROXIES=172.18.0.1,172.18.0.2,REMOTE_ADDR,varnish # Docker networking DEFAULT_GATEWAY=172.144.0.0 -SOLR_HOST=solr -SOLR_PORT=8983 -SOLR_CORE_NAME=roadiz -VARNISH_HOST=varnish -VARNISH_DOMAIN=varnish.roadiz-skeleton.test -VARNISH_URL=http://varnish VARNISH_SIZE=256M -HTTP_CACHE_MAX_AGE=60 -HTTP_CACHE_SHARED_MAX_AGE=600 -HTTP_CACHE_STALE_WHILE_REVALIDATE=60 # To use with Traefik and your local dev environment # On linux you can use dnsmasq to redirect all DNS for *.test TLD to your machine. @@ -61,6 +60,16 @@ HOSTNAME_PMA=`^pma\.roadiz\-skeleton\.(test|local)$` HOSTNAME_SOLR=`^solr\.roadiz\-skeleton\.(test|local)$` HOSTNAME_MAILER=`^(mail|mailer)\.roadiz\-skeleton\.(test|local)$` +## Restic backup configuration +#S3_ACCESS_KEY= +#S3_SECRET_KEY= +#S3_STORAGE_CLASS=STANDARD +#RESTIC_PASSWORD= +RESTIC_REPOSITORY= +MYSQL_DUMP_FILENAME=api_database_dump.sql + +###< docker/env ### + ###> symfony/lock ### # Choose one of the stores below # postgresql+advisory://db_user:db_password@localhost/db_name @@ -94,6 +103,18 @@ APP_VERSION=0.1.0 APP_HEALTH_CHECK_TOKEN= APP_RECAPTCHA_PUBLIC_KEY= +SOLR_HOST=solr +SOLR_PORT=8983 +SOLR_CORE_NAME=roadiz + +VARNISH_HOST=varnish +VARNISH_DOMAIN=varnish.roadiz-skeleton.test +VARNISH_URL=http://varnish + +HTTP_CACHE_MAX_AGE=60 +HTTP_CACHE_SHARED_MAX_AGE=600 +HTTP_CACHE_STALE_WHILE_REVALIDATE=60 + ## Define these secret values with Symfony secret and Vault #APP_GOOGLE_SERVER_ID= #APP_SOUNDCLOUD_CLIENT_ID= @@ -154,14 +175,6 @@ DATABASE_URL="mysql://roadiz:roadiz@db:3306/roadiz?serverVersion=mariadb-11.4.4& # DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8" ###< doctrine/doctrine-bundle ### -## Restic backup configuration -#S3_ACCESS_KEY= -#S3_SECRET_KEY= -#S3_STORAGE_CLASS=STANDARD -#RESTIC_PASSWORD= -RESTIC_REPOSITORY= -MYSQL_DUMP_FILENAME=api_database_dump.sql - ###> sentry/sentry-symfony ### SENTRY_DSN= ###< sentry/sentry-symfony ### diff --git a/.gitignore b/.gitignore index 8eb4f37..7a2338c 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,7 @@ openapi.json # We need to track main .env and phpstan.neon files !/.env -!/phpstan.neon +!/phpstan.dist.neon !/public/assets/.gitkeep !/public/files/.gitkeep @@ -60,3 +60,7 @@ supervisord.pid /.php-cs-fixer.php /.php-cs-fixer.cache ###< friendsofphp/php-cs-fixer ### + +###> phpstan/phpstan ### +phpstan.neon +###< phpstan/phpstan ### diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e7a211..c812d22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ test: # - composer install - php -d memory_limit=-1 vendor/bin/php-cs-fixer check --ansi -vvv - - php -d memory_limit=-1 vendor/bin/phpstan analyse -c phpstan.neon + - php -d memory_limit=-1 vendor/bin/phpstan analyse - php -d memory_limit=-1 vendor/bin/phpunit --colors=never build_develop: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9222ed4..d966c52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to project will be documented in this file. +## [2.4.7](https://github.com/roadiz/skeleton/compare/v2.4.6...v2.4.7) - 2025-01-13 + +### Bug Fixes + +- Cleanup dotenv file to split between docker/env vars and Symfony - ([61916a1](https://github.com/roadiz/skeleton/commit/61916a1c96c5b5e4a422ed275fe44d88c6a612c1)) - Ambroise Maupate +- Use regular file name for phpstan flex recipe - ([2291f97](https://github.com/roadiz/skeleton/commit/2291f97c613582d077af8897def4a7c44be15df7)) - Ambroise Maupate + +### Documentation + +- Better `users:create` command example - ([98b13d2](https://github.com/roadiz/skeleton/commit/98b13d288e5fa9abf4968040cc7d65d81448bb58)) - Ambroise Maupate + ## [2.4.6](https://github.com/roadiz/skeleton/compare/v2.4.5...v2.4.6) - 2025-01-10 ### Bug Fixes diff --git a/Makefile b/Makefile index 2863ad9..6a2b440 100644 --- a/Makefile +++ b/Makefile @@ -5,18 +5,19 @@ cache: docker compose exec app php bin/console messenger:stop-workers test: - docker compose exec app php -d "memory_limit=-1" vendor/bin/php-cs-fixer fix --ansi -vvv - docker compose exec app php -d "memory_limit=-1" vendor/bin/phpstan analyse -c phpstan.neon + docker compose run --rm app php -d "memory_limit=-1" vendor/bin/php-cs-fixer fix --ansi -vvv + docker compose run --rm app php -d "memory_limit=-1" vendor/bin/phpstan analyse XDEBUG_MODE=coverage php -d "memory_limit=-1" vendor/bin/phpunit update: + docker compose run --rm app composer install -o docker compose exec app php bin/console doctrine:migrations:migrate -n # Do not perform files changes just apply existing migrations and import data docker compose exec app php bin/console app:install -n make cache; update_deps: - docker compose run --rm --entrypoint= app composer update -o + docker compose run --rm app composer update -o migrate: docker compose exec app php bin/console doctrine:migrations:migrate -n @@ -26,6 +27,8 @@ migrate: docker compose exec app php bin/console messenger:stop-workers install: + docker compose run --rm app composer install -o + docker compose up -d docker compose exec app php bin/console doctrine:migrations:migrate -n # Do not perform files changes on the database docker compose exec app php bin/console app:install -n @@ -33,7 +36,7 @@ install: make cache; changelog: - git-cliff -o CHANGELOG.md + git cliff -o CHANGELOG.md bump: - git-cliff --bump -o CHANGELOG.md + git cliff --bump -o CHANGELOG.md diff --git a/README.md b/README.md index 579ef53..81e8d27 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,8 @@ docker compose exec app bin/console cache:clear Before accessing the application, you need to create an admin user. Use the following command to create a user account: ```shell # Create your admin account with the specified username and email -docker compose exec app bin/console users:create -m username@roadiz.io -b -s username +export EMAIL="username@roadiz.io" +docker compose exec app bin/console users:create -m $EMAIL -b -s $EMAIL # By default, a random password will be generated for the new user. # If you want to set a custom password, you can add the -p option followed by your desired password ``` diff --git a/phpstan.neon b/phpstan.dist.neon similarity index 100% rename from phpstan.neon rename to phpstan.dist.neon