4

I am using Docker Toolbox on Windows 10 Home. I am not able to see the changes in my code on the docker-container.

My docker-compose.yml file looks like this

version: "3.7"

services:
  flask:
    build: ./flask
    container_name: flask
    restart: always
    environment:
      - APP_NAME=MyFlaskApp
    expose:
      - 8080
    volumes:
      - ./flask:/app

  nginx:
    build: ./nginx
    container_name: nginx
    restart: always
    ports:
      - "80:80"

And my Dockerfile looks like this

FROM python:3.7.2-stretch

# Set the working directory to /app
WORKDIR /app

# Copy the current directory contents into the container at /app 
ADD . /app

# Install the dependencies
RUN pip install -r requirements.txt

# run the command to start uWSGI
CMD ["uwsgi", "app.ini"]

My folder structure is like this

-project
  - flask
    - app.ini
    - Dockerfile
    - requirements.txt
    - run.py
  -nginx
    - Dockerfile
    - nginx.conf

I'm pretty sure everything is in order here but I still can't make live changes to the server

Akash Aaron
  • 116
  • 1
  • 7
  • Just curious, how come you want to mount the same folder that you have all your build files in? – J. Scott Elblein Apr 02 '20 at 12:53
  • I don't understand, can you please elaborate? If you are talking about the dockerfile, that is for the flask directory. So I just want to mount the flask folder. – Akash Aaron Apr 03 '20 at 08:11

0 Answers0