Closed rsida closed 3 years ago
Hi, It's a bit vague as a problem, that may be a lot of things. Start by interpreting the docker logs to know if you are accessing them when there is an HTTP call
``I got this when tried to go to "/_profiler": And this when I go through "https://localhost/front/test": Here is my composer.json (just in case of):
{
"type": "project",
"name": "wayet/core",
"description": "none",
"license": "proprietary",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.0",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "1.11.99.1",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.3",
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "^2.8",
"phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "^6.1",
"symfony/asset": "5.2.*",
"symfony/console": "5.2.*",
"symfony/debug-bundle": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/expression-language": "5.2.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.2.*",
"symfony/framework-bundle": "5.2.*",
"symfony/http-client": "5.2.*",
"symfony/intl": "5.2.*",
"symfony/mailer": "5.2.*",
"symfony/mime": "5.2.*",
"symfony/monolog-bundle": "^3.7",
"symfony/notifier": "5.2.*",
"symfony/process": "5.2.*",
"symfony/property-access": "5.2.*",
"symfony/property-info": "5.2.*",
"symfony/proxy-manager-bridge": "5.2.*",
"symfony/security-bundle": "5.2.*",
"symfony/serializer": "5.2.*",
"symfony/stopwatch": "^5.2",
"symfony/string": "5.2.*",
"symfony/translation": "5.2.*",
"symfony/twig-bundle": "^5.2",
"symfony/validator": "5.2.*",
"symfony/var-dumper": "5.2.*",
"symfony/web-link": "5.2.*",
"symfony/web-profiler-bundle": "^5.2",
"symfony/yaml": "5.2.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"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": "*"
},
"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": "5.2.*",
"docker": true
}
},
"require-dev": {
"symfony/maker-bundle": "^1.30"
}
}
And the result of my debug:router:
Ok, I think I got something. My changes is not apply to the server. I try to put a die() inside my 'public/index.php' file and the refresh still display the default Symfony page. Same after a docker restart.
Maybe I miss something. Can someone confirm me that, after launching Docker, I could just update the project folder. Like if my project is in /home/admin/my_project, if I do docker-composer up
, then I could directly update /home/admin/my_project without enter inside the PHP container, right ?
Maybe I miss something. Can someone confirm me that, after launching Docker, I could just update the project folder. Like if my project is in /home/admin/my_project, if I do
docker-composer up
, then I could directly update /home/admin/my_project without enter inside the PHP container, right ?
The usual way want that when you edit your project, you can test the changes in your browser throught the running docker instance. You don't have to enter in your container.
I have no idea about your problem, you are on a recent version, your docker-compose file seems to be like the default one with a DB, no problem here I think. Maybe cache ?
That's really weird, I have to make docker-compose up --build
each time I made change to work.
EDIT: A little information about my env. I'm on a MAC using Docker Desktop version 3.3.1.
Are you actually using docker-compose
or the new docker compose
method?
In the new docker compose
method there is a bug with the override file not being applied. Which means the volume entry ./:/srv/app:rw,cached
would not work and therefore your files won't sync across. I had this issue today.
I actually try both but I'm using the Docker Desktop 3.3.2 (I try 3.3.1 too) and there is a chance that one using the other. I mean docker-compose
used docker compose
internally I don't know. Any way I'll try solution given in the topic you linked 👍🏽
Ok you are right. I made a little tool to help me with some commands and I put docker compose
one. Using docker-compose
looks good now. Thanks a lot !
Hello, I'm a bit new on Docker so maybe it's just a misconfiguration but it looks weird. I actually success to install and launch docker and when I go through https://localhost it work great. And now, when I create a controller (I do required minimal config for an website) with it's config and go through https://localhost/my/route or https://localhost/index.php/my/route I got a 404 not found. But when I do
bin/console debug/router
my route is defined.Here is my docker-compose.yml:
And my .env: