Conversation
|
Hello, I tried to have a look at this to get it working using docker-compose. I rebased this and here is where I am currently: Still more to do, but I’m stuck on a Django migration thing (and my Django-fu is not that strong): Steps to reproduce:
Looking around, folks often advise to run Would that ring a bell to anyone by any chance ? :) |
|
Thoughts @stefankoegl ? :) |
|
Hello, I tried to run mygpo in docker-compose and got the same error. It looks like there is a missing initialization of the DB, but "manage.py migrate" did not help. How can I initialize the database properly? |
|
With the Dockerfile from @morgenroth I get the same error. I think it is maybe because of python 3. So I tried it with an older ubuntu version and python 2.7. Unfortunately without any luck :( |
|
Digging through StackOverflow, that might rather be something due to a Django upgrade? |
|
I tried various commands, including: Without any luck :( . |
|
This is due to changed exception thrown on by django when a table is missing from the DB. In mygpo/users/checks.py, import ProgrammingError instead of OperationalError and catch it: This worked for me |
As suggested by @elelay on gpodder#32 (comment)
|
Thanks @elelay ! That did the trick. I got a bit further on in JeanFred@d8d89a2 |
|
Great! |
|
Hi everyone! I appreciate your interest in that topic, and I'd like to continue working on that pull request. Is anyone of you still working on that? Where did you get stuck exactly? |
|
My struggles were with compatibility with newer django version (ProgrammingError instead of ProgrammingError) and python 2 compatibility (broken in a few files). I've not tried to dockerize. |
|
Great to hear you're working on it, btw. Thanks! |
This is useful for development, when there is no nginx server to serve assets.
As suggested by @elelay on #32 (comment)
This keeps crashing with ` ModuleNotFoundError: No module named 'django_nose'` even though the package is installed. Let's ignore for now.
|
@stefankoegl I don’t really work actively on it (I just thought it would be a fun app to dockerize :). Glad to hear you are on it :) With my current setup I got as far as correctly running mygpo using docker-compose. Static assets are served, I could create user account from command line.
All in all, you may be interested in these two commits:
Hope that helps! (Note that I’m not very familiar with mygpo so I definitely may have missed obvious things) |
|
I am currenly triaging this pull request. For more discussions about Docker containerization, please comment under #355 😄 |
There is no sudo available in the Docker environment. Let's just move the `apt-get` call command to a variable, and override it in Makefile call in the Dockerfile.
There was a breaking change recently in Postgres Docker image:
```
Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD for the superuser. Use
"-e POSTGRES_PASSWORD=password" to set it in "docker run".
You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
without a password. This is *not* recommended. See PostgreSQL
documentation about "trust":
https://www.postgresql.org/docs/current/auth-trust.html
```
This may not be the best setting, but let's go for this.
See docker-library/postgres#681
Without it, the step `compilemessages` fails.
|
I tried spinning up this and ran into a couple of issues, which I submitted as #397. Hope this helps! This gets me as far as a clean Docker build, and an accessible UI. Static assets (CSS etc.) are however not served. EDIT: Added one more commit, static assets are now correctly served. |
This is one of the few requirements for whitenoise to just work. See http://whitenoise.evans.io/en/stable/django.html (This had been done in cdcb34f, but probably lost in a master merge)
Using (gpodder#32) and (gpodder#397) as a starting point, we implement some changes to get mygpo to run correctly under Docker. To actually make use of this, we need an as-yet-unpublished `Dockerfile` and `docker-compose.yaml`.
Using (gpodder#32) and (gpodder#397) as a starting point, we implement some changes to get mygpo to run correctly under Docker. To actually make use of this, we need an as-yet-unpublished `Dockerfile` and `docker-compose.yaml`.
Some fixes for the Docker setup
|
Hi there. I figure I'd offer this wonderful script I use in my projects to wait for other containers to be there before you start https://github.com/vishnubob/wait-for-it Add this to the container that you want to hold up for a service. |
Support running gpodder.net in Docker.
Getting started
TODO
beatandworkerfail because the database takes too long to start