View more context

 

taoceanz

Has anyone experienced tasks not running via cli while running SS in a Docker container? I run tasks and they return with no output. I've tried running stracer but haven't found any obvious failures that would cause a task to exit before it completes. No errors, warning, issues etc either.

nate-sd
  • Version 3.3
  • Force mysql 5.7
  • removed
    1. volumes:
    2. db-data:

And it was happy @taoceanz

taoceanz

@nate-sd Interesting, are you storing your database in a directory just below the web root?

👍 (1)
taoceanz

I have a similar set up for some testing I did which is the following. It names the sql volume as ss-mysql-storage and is stored in /var/lib/docker/volumes which can be viewed, deleted etc via docker commands. Note also it creates a db schema of 'silverstripe-test' if it doesn't exist and sets the root password to... 'password'. https://docs.docker.com/storage/

taoceanz

This is the .env to work with the schema created by docker.

taoceanz

Only thing that I didn't understand the reason why is occasional necessity to exec into the web container and run a ./vendor/bin/sake dev/build for the first time the network and containers are created and as such, the init of the schema.

👍 (1)
taoceanz

I've got this persistent issue with base url. Viewing pages via admin in split mode, pages load correctly with base url set correctly, but when viewing any page out of admin, the base url gets set to Docker container id resulting in something like http://jkfdi4nfvjkdls:8080/. Any ideas on what could be going wrong?

stevie

@taoceanz one thing you can do is ensure that you are forcing the base url in configuration in your .env: SS_BASE_URL="http://myurl.localhost/"

stevie

otherwise I imagine whats happening is that the proxy or the actual server inside docker is reporting back its base as being the machine name and port its running on there