TYPO3-docker-boilerplate
TYPO3-docker-boilerplate copied to clipboard
feature/cloud-support feedback
The feature/cloud-support looks good, thx Markus for your hard & continuous work
I found some errors and have some suggestions & questions:
Errors:
- dnsmasq is looping around saying bad address at line 2 of /etc/dnsmasq.d/development -> problem with hostname -i (I hacked it with $(hostname -i | cut -d' ' -f1)
- Fix code right (UID/GID) also inside the entrypoint.sh of storage container ?
- Fix truncating log files with touch instead of cp /dev/null in configuration.yml
Suggestions:
- Use a default symlink to docker-compose.yml for the inexperienced user as Elmar suggested. Every one can of course change later the symlink to another target to suit their needs.
- Rename storage to shared to reflect shared data among all containers (cache,dns,ftp,...)
- Explain to the user there is a convenient way to shell it into the running container docker exec -ti [main|web|storage|...] bash (for debugging, inspection, ...)
- Use dockerfile extends to separate development from production
extends
Extend another service, in the current file or another, optionally overriding configuration.
- Divert volume pointer only inside sourcecode to point to /code local (devel) or remote (cloud), maybe using the above extends at buildtime and ENV state? It means the main & web container are always pointing to the sourcecode container
- We would also need a sort of export/import to a running container for runtime injection and source code synchronization. (docker dependency > 1.8)
Usage: docker cp [options] CONTAINER:PATH LOCALPATH|-
docker cp [options] LOCALPATH|- CONTAINER:PATH
- A better way IMHO could be also lazy instantiation of /code or /db with a URL, git clone, ...
- Maybe we would also need a read/write or read-only flag to prevent accidental data overwrites.
- Decoupling main from web container using the main container only for buildtime configuration and mgmt services like backup/restore webdata, dbdata, ... Reduces footprint, the main container can be started on demand with cron or manually to execute mgmt tasks
Questions:
- How can I inject the sourcecode at runtime and not only at buildtime
- How can I generally make changes at runtime
- Is there a chance to set the hostname and/or alias, e.g. main main_1, web web_1 ...
- How can I propagate container names to upstream dnsserver. This makes hard to ssh into main without introspecting the running container
- Whats about exchanging dnsmasq with unbound or adding firewalld services ?
- If docker-compose scalability is not needed (e.g.: main_1, main_2, ...) can we rename or better alias the container names?
Please forgive me if I don't know how your environment is working in deep details :-) just my 2 cent
Please join #docker-boilerplate on typo3.slack.com