I am working on a Django project, & I am using Docker Compose to set up and run a simple Django/PostgreSQL app. The problem is when I try to run the command "docker-compose up" the terminal gives me the URL to run on the browser but nothing happening in the browser. Can you help me if you have any idea, I will be so thankful.
Dockerfile:
FROM python:3.7-alpine
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
Docker-compose.yml:
version: '3'
services:
web:
build: .
command: python src/products_projects/manage.py runserver 192.168.99.100:8000
volumes:
- .:/code
ports:
- "8000:8000"
redis:
image: "redis:alpine"
The Docker Terminal:
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
$ docker-machine ip
192.168.99.100
The results in the terminal:
web_1 | Watching for file changes with StatReloader
web_1 | Performing system checks...
web_1 |
web_1 | System check identified no issues (0 silenced).
web_1 | August 31, 2020 - 11:44:23
web_1 | Django version 3.1, using settings 'products_projects.settings'
web_1 | Starting development server at http://192.168.99.100:8000/
web_1 | Quit the server with CONTROL-C.
web_1 | Error: That IP address can't be assigned to.
productsrestapidocker_web_1 exited with code 1