Open ezawadzki opened 2 years ago
Why was this closed? I have the same issue currently, as well as postgres yelling at me that role "root" does not exist
.
I have the same issue here too
Also experiencing the same issue. Some further explanation to get up and running in the readme for docker newbies could be helpful as well.
I'm still unable to reproduce this. To ensure we're all on the same page, can you clone this repo and follow the instructions in the README?
https://github.com/timkelty/craftcms-docker-compose
note: the role "root" does not exist.
from postgres is a red herring.
I managed to get this up and running by initialising a craft installation as usual, then adding the docker-compose yaml and Dockerfile as suggested in this readme. The role "root" does not exist
issue is solvable via adding the user to the pg_isready command as : test: pg_isready -U craftcms -d dev_craftcms
you will also need to exec into the shell once its up and running with docker-compose exec web sh
and then run ./craft install
to install craft to the db
you will also need to exec into the shell once its up and running with docker-compose exec web sh and then run ./craft install to install craft to the db
Yes, or you can do it via the web interface (will prompt you on first visit to /admin)
The role "root" does not exist issue is solvable via adding the user to the pg_isready command as : test: pg_isready -U craftcms -d dev_craftcms
Good call, I'll update the example compose file
I'm also getting 404's. Maybe I am misunderstanding the instructions?
In new directory: using the docker-compose.yml
from https://github.com/craftcms/docker#running-locally-with-docker-compose.
Tried image: craftcms/...:8.0
and image: craftcms/...:8.1
.
I copied the .env.example (although I don't think it is used in the docker compose file), and I run docker compose up
.
I get:
localhost:8080/admin
(and /
)When I check the container, there's nothing in the /app
folder (so: can't run ./craft install
)
$ docker exec -it craftcms-web-1 sh
/app $ ls -l
total 0
craftcms-postgres-1 | 2023-05-01 11:28:34.307 UTC [1] LOG: database system is ready to accept connections
craftcms-console-1 | Could not open input file: craft
craftcms-console-1 exited with code 1
craftcms-web-1 | 2023-05-01 11:29:04,098 INFO supervisord started with pid 1
craftcms-web-1 | 2023-05-01 11:29:05,107 INFO spawned: 'nginx' with pid 7
craftcms-web-1 | 2023-05-01 11:29:05,113 INFO spawned: 'php-fpm' with pid 8
craftcms-web-1 | nginx: [alert] could not open error log file: open() "/var/lib/nginx/logs/error.log" failed (13: Permission denied)
craftcms-web-1 | [01-May-2023 11:29:05] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
craftcms-web-1 | [01-May-2023 11:29:05] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
craftcms-web-1 | [01-May-2023 11:29:05] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
craftcms-web-1 | [01-May-2023 11:29:05] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
craftcms-web-1 | [01-May-2023 11:29:05] NOTICE: fpm is running, pid 8
craftcms-web-1 | [01-May-2023 11:29:05] NOTICE: ready to handle connections
craftcms-web-1 | 2023-05-01 11:29:06,253 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
craftcms-web-1 | 2023-05-01 11:29:06,253 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
craftcms-web-1 | 172.24.0.1 - - [01/May/2023:11:29:14 +0000] "GET /admin HTTP/1.1" 404 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" "-" 0.000 - . -
craftcms-web-1 | 172.24.0.1 - - [01/May/2023:11:29:20 +0000] "GET / HTTP/1.1" 404 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" "-" 0.000 - . -
@wivaku These docker images only provide the environment required to run Craft, not any of the actual application files.
If you don't have an existing Craft app, you can start one via composer create-project craftcms/craft my-project
.
There more in-depth guides here, but those focus on using DDEV for local development.
ah, ok. Thanks.
Hi, I have created a local project and was able to build a image with dependencies. But when i use this image to run container on ECS, the dependent files are missing and it gives me 404 error. Anyone able to run craftcms on ECS?
@nagarjuna-jammula Hmmm, yes we run them on ECS regularly… if you can share more details, or send to support@craftcms.com, we may be able to point you in the right direction.
Description
When I try to connect to localhost:8080, nginx is returning me a 404.
Here are some relevant docker-compose logs :
Steps to reproduce
Just execute
docker-compose up
on suggesteddocker-compose.yml
.Additional info
image: craftcms/nginx:8.0-dev
image: craftcms/cli:8.0-dev
image: postgres:13-alpine
image: redis:5-alpine
Docker-compose file : 3.6
docker: 20.10.8
docker-compose: 1.29.2
Debian : Linux debian 5.10.0-0.bpo.8-amd64
Thanks for your help.