Improve docker support
See original GitHub issue- I think it would be better to only copy in the app and not the config
- I think the docker image itself should be responsible for running the init.sh and not the docker compose file
- I think the docker image should be published to docker hub from this repo (Only @chibicitiberiu can set this up, I setup a fork to build but only he or someone with repo access can do that so that it’s up to date)
- Config/data should be VOLUME’d and port should be EXPOSED’d
All of this would allow for someone to do the following:
$ docker pull chibicitiberiu/ytsm
$ docker run chibicitiberiu/ytsm -v /path/to/my/config:/config -v /path/to/my/media:/media
The docker compose file is a nice touch but I think it currently has too much “Responsibility” as in the docker image should stand on it’s own and the docker compose file should make use of that image and setup other things (nginx/db) so that people can use their own reverse proxy/db but the compose file is an example of how to get things up and running quick (to that end I think the default should be sqlite with an option to use another DB).
I’m not sure if this is the best place to discuss this and I’m happy to move the discussion to an issue or elsewhere.
Edit: Also I think we need a way to move the DB config out of settings.py so that it can be set via the INI config file
_Originally posted by @joshstrange in https://github.com/chibicitiberiu/ytsm/pull/1#issuecomment-434385465_
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:24 (9 by maintainers)
I forgot to remove some options from
settings.py
(such as YT API key, and a few others) that I used in early development, I can clean that up.The
config.ini
parser supports using environment variables using the syntax ${env:SOMETHING}, perhaps we could provide aconfig.docker.ini
which takes configuration from environment variables.I agree that database should also be included in
config.ini
. I think it is possible to build thesettings.py
file dynamically at runtime, I’ve seen examples where they checked an environment variable for selecting between development and production. There’s also #7 which involves cleaning upsettings.py
.I have a busy week, not sure if I can get anything done until Saturday, if someone wants to take that until then, let me know.
@joshstrange Sorry to address you separately. Saw your comment after i posted previous message.
I agree with you on the points, i would fork and patch on my end if i had the time to work on it, but that would be a hack/workaround with minimal changes to the python code because my lack of experience with it.