Closed Rom1906 closed 6 months ago
Can you share your composer.json
file please? It looks like TwigBundle is not part of the non-dev dependencies while it should.
Yes of course :
{
"name": "symfony/skeleton",
"type": "project",
"license": "MIT",
"description": "A minimal Symfony project recommended to create bare bones applications",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=8.2.10",
"ext-ctype": "*",
"ext-iconv": "*",
"runtime/frankenphp-symfony": "^0.1.1",
"symfony/console": "6.3.*",
"symfony/dotenv": "6.3.*",
"symfony/flex": "^2",
"symfony/framework-bundle": "6.3.*",
"symfony/runtime": "6.3.*",
"symfony/var-dumper": "6.3.*",
"symfony/yaml": "6.3.*"
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"symfony/flex": true,
"symfony/runtime": true
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.3.*",
"docker": true
}
},
"require-dev": {
"symfony/maker-bundle": "^1.51",
"symfony/stopwatch": "6.3.*",
"symfony/web-profiler-bundle": "6.3.*"
}
}
The problem is that TwigBundle isn't listed in your require
section. Typing composer req twig
should fix the issue.
The problem is that TwigBundle isn't listed in your
require
section. Typingcomposer req twig
should fix the issue.
Yes now no problem for build and up the contenairs (can you list all the dependencies like twig are required for production please ? ) But there is a problem with ssl : ERR_SSL_PROTOCOL_ERROR
The problem is that TwigBundle isn't listed in your
require
section. Typingcomposer req twig
should fix the issue.Yes now no problem for build and up the contenairs (can you list all the dependencies like twig are required for production please ? ) But there is a problem with ssl : ERR_SSL_PROTOCOL_ERROR
Some details on this ERR_SSL_PROTOCOL_ERROR problem.
I have a feeling these are the instructions before the command docker compose -f docker-compose.yml -f docker-compose.prod.yml up --wait
SERVER_NAME=your-domain-name.example.com \
APP_SECRET=ChangeMe \
CADDY_MERCURE_JWT_SECRET=ChangeThisMercureHubJWTSecretKey \
which are not executed because if I put my domain name, SERVER_NAME, in the Symfony .env then it works. Is a known issue? What is good practice?
What is your domain name? Do you have something related to SSL in the logs?
(TwigBundle is a dependency of your application. Symfony doesn't depend on TwigBundle by default, there is nothing we can do about that on our side.)
(TwigBundle is a dependency of your application. Symfony doesn't depend on TwigBundle by default, there is nothing we can do about that on our side.)
Thanks for reply, it's strange beacause locally I have no problems. Maybe it's the profiler who use twig but I'm sure I always used composer require...
What is your domain name? Do you have something related to SSL in the logs?
domain name is vps.opaleweb.com Where can I find the ssl logs or access logs with this config please ?
You should have logs by running docker compose logs
. Are you using the standard port (443)? Non-standard ports aren't supported by Let's Encrypt.
You should have logs by running
docker compose logs
. Are you using the standard port (443)? Non-standard ports aren't supported by Let's Encrypt.
Sorry but I have no logs no configuration file provided: not found
and I use the standard port. If it can help you I can send to you by private message the access to the vps ?
this .env works in production with the offical command
###> symfony/framework-bundle ###
APP_ENV=prod
SERVER_NAME=vps.opaleweb.com
CADDY_MERCURE_JWT_SECRET=xxxxxx
APP_SECRET=xxxxxxx
###< symfony/framework-bundle ###
BUT this .env doesn't works with the official command below
###> symfony/framework-bundle ###
APP_ENV=prod
###< symfony/framework-bundle ###
The command
SERVER_NAME=vps.opaleweb.com \
APP_SECRET=xxxxx \
CADDY_MERCURE_JWT_SECRET=xxxxxx \
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --wait
It's the only difference
@dunglas have you a clean solution to this issue please ?
@dunglas have you a clean solution to this issue please ?
Have you tried passing the environment variable with -e ?
docker compose -e SERVER_NAME=vps.opaleweb.com -e APP_SECRET=xxxxx -e CADDY_MERCURE_JWT_SECRET=xxxxxx -f docker-compose.yml -f docker-compose.prod.yml up -d --wait
@dunglas have you a clean solution to this issue please ?
Have you tried passing the environment variable with -e ?
docker compose -e SERVER_NAME=vps.opaleweb.com -e APP_SECRET=xxxxx -e CADDY_MERCURE_JWT_SECRET=xxxxxx -f docker-compose.yml -f docker-compose.prod.yml up -d --wait
Hello when I try it I get :
unknown shorthand flag: 'e' in -e
Hi @Rom1906
First, the TwigBundle is installed by the symfony/web-profiler-bundle and not present when the composer command use --no-dev
during the install.
For the SSL, don't run docker compose logs
anywhere. Run it in your docker project folder.
For the env, I don't understand what the problem is? For the reccord, the flag -e
work only on docker run
command not on docker compose
command.
Hi ! in locally all is all right but when I try to deploy my project on production with this documentation : https://github.com/dunglas/symfony-docker/blob/main/docs/production.md#deploying I get this error :
My os is ubuntu 22.04 up to date with new installation of docker