I'm trying to run a project that uses Django and uWSGI in a Docker container. But I'm new to Docker and uWSGI so I'm not quite sure how I'm supposed to do it.
At first I build the project with the below command:
docker build -t saleor .
Then I run it:
docker run --env SECRET_KEY="<the key>" -p 4000:80 saleor
And this is what I get:
[uWSGI] getting INI configuration from /app/saleor/wsgi/uwsgi.ini
[uwsgi-static] added mapping for /static => /app/static
*** Starting uWSGI 2.0.15 (64bit) on [Tue Dec 19 14:02:19 2017] ***
compiled with version: 4.9.2 on 19 December 2017 09:11:22
os: Linux-4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017
nodename: 88adfd3f2e93
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /app
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
building mime-types dictionary from file /etc/mime.types...547 entry found
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address :8000 fd 3
Python version: 3.5.4 (default, Dec 12 2017, 16:43:39) [GCC 4.9.2]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x12277b0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145536 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x12277b0 pid: 1 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 1)
spawned uWSGI worker 1 (pid: 10, cores: 1)
Then I don't know what I'm supposed to do. Usually with Django applications, I just would check "localhost:4000" in my browser. But it doesn't work in this case and I get nothing. So...what am I supposed to do?
thanks