Issue
Well I am trying to get django aplication on a prodaction server using uwsgi and docker. On production server nginx is started but it does not configured for uwsgi. I install uwsgi using pip without virtual environment into docker. However when I try up service with django app I get uwsgi_master_fifo()/mkfifo(): Permission denied [core/fifo.c line 112]
.
My uwsgi.ini:
[uwsgi]
http-socket = :8000
chmod-socket = 777
chdir = /api/
module = MenStore.wsgi:application
static-map = /staticfiles=static
master = true
processes = 4
offload-threads = 4
vacuum = true
harakiri = 30
max-requests = 10000
stats = :9191
memory-report = true
enable-threads = true
logger = internalservererror file:/tmp/uwsgi-errors.log
post-buffering = 1
buffer-size = 16383
uid = 1000
gid = 1000
touch-reload = uwsgi-reload
master-fifo = uwsgi-fifo
My django app service into docker-compose file:
api: &api
build:
context: Backend
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- "/root/MenStore/media/:/api/media/:rw"
command: uwsgi --ini /api/uwsgi.ini
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
Solution
I found solution. I added RUN chmod 0777 [work_directory]
into my Dockerfile.
Answered By - IlyaVasilev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.