mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.81k stars 524 forks source link

Docker installation failed at postgres_data and 502 afterwards #286

Closed rajanverma-me closed 3 years ago

rajanverma-me commented 3 years ago

After running docker-compose up at the end it got failed with

Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /Users/rajan/workspace/postgres_data  

I am still trying to find where the postgres_data is .. there is no documentation, also no updates about this folder. why is it showing outside of root directory in docker-compose.yaml

db:
    image: postgres
    volumes:
      - ../postgres_data:/var/lib/postgresql/data/

but inside the root directory in gitignore

...
media_files/chunks/
media_files/uploads/
postgres_data/
celerybeat-schedule
logs/
pids
...

and again outside the root directory in docker-compose-dev

  db:
    image: postgres
    volumes:
      - ../postgres_data:/var/lib/postgresql/data/

again inside the root directory in. docker-compose-named-volumes.yaml

db:
    image: postgres
    volumes:
      - postgres_data:/var/lib/postgresql/data/

Moreover, I manually created it and got it worked but HTTP://localhost is still not accesssible. It says 502 Bad gateway. Some logs when I hit the localhost:

web_1            | invalid request block size: 8714 (max 4096)...skip
web_1            | 2021/08/26 04:13:20 [error] 149#149: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.19.0.1, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://127.0.0.1:9000", host: "localhost"
web_1            | 172.19.0.1 - - [26/Aug/2021:04:13:20 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
web_1            | Thu Aug 26 05:13:21 2021 - *** uWSGI listen queue of socket "127.0.0.1:9000" (fd: 3) full !!! (26518415/64) ***
web_1            | invalid request block size: 8641 (max 4096)...skip
web_1            | 172.19.0.1 - - [26/Aug/2021:04:13:21 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "http://localhost/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
web_1            | 2021/08/26 04:13:21 [error] 149#149: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.19.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/"

Please guide.

I am using MacOS BigSur V: 11.4 (20F71)

swiftugandan commented 3 years ago

rajanverma-me commented 3 years ago

yup.. Release note is fine.. at least it will help newcomers to get clarity over the purpose. regarding the second issue.... I tried doing exact steps on my system but was still unable to solve the 502 gateway issue, any suggestion over that will be helpful. the logs are shared above.

swiftugandan commented 3 years ago

yup.. Release note is fine.. at least it will help newcomers to get clarity over the purpose. regarding the second issue.... I tried doing exact steps on my system but was still unable to solve the 502 gateway issue, any suggestion over that will be helpful. the logs are shared above.

Which compose file did you use in this case?

rajanverma-me commented 3 years ago

The default one docker-compose.yaml

swiftugandan commented 3 years ago

Are all the micro-services running?

Whats the output of docker ps?

rajanverma-me commented 3 years ago

Yes, all 6 are running fine, but the 502 gateway issue still persists. Here is the output.

CONTAINER ID   IMAGE          COMMAND                  CREATED        STATUS                    PORTS                                         NAMES
ee4a4b87188a   c69825410d97   "./deploy/docker/ent…"   12 hours ago   Up 14 seconds             0.0.0.0:80->80/tcp, :::80->80/tcp, 9000/tcp   mediacms_web_1
acb4feddbe12   c69825410d97   "./deploy/docker/ent…"   12 hours ago   Up 14 seconds             80/tcp, 9000/tcp                              mediacms_celery_worker_1
668c25b1eb77   c69825410d97   "./deploy/docker/ent…"   12 hours ago   Up 15 seconds             80/tcp, 9000/tcp                              mediacms_migrations_1
b134bb66ba0c   17633a8022b8   "docker-entrypoint.s…"   12 hours ago   Up 41 seconds (healthy)   5432/tcp                                      mediacms_db_1
0e6934cf7a97   c69825410d97   "./deploy/docker/ent…"   12 hours ago   Up 45 seconds             80/tcp, 9000/tcp                              mediacms_celery_beat_1
77b8e487602f   a4b2ec2d149e   "docker-entrypoint.s…"   12 hours ago   Up 46 seconds (healthy)   6379/tcp                                      mediacms_redis_1