I'm running docker-compose to run my application which listen to REST api calls.
For some reason it is not accessible from outside.
I don't understand what am I doing wrong.
Here is the configuration:
version: '3.4'
services:
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
my-server:
image: my-server
build:
context: .
dockerfile: ./apiserver/Dockerfile
ports:
- 5000:5000
restart: on-failure
depends_on:
- rabbitmq
and my Dockerfile is:
FROM ubuntu:16.04
RUN apt-get update -y && \
apt-get install -y python-pip python-dev
# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /app
EXPOSE 5000
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]