title: Docker + NGINX, how can I copy the configuration file from host to container?
body: <p>This is my basic NGINX setup that works!</p>
  
  <pre><code>web:
    image: nginx
    volumes:
     - ./nginx:/etc/nginx/conf.d
    ....
  </code></pre>
  
  <p>I replace the <code>volumes</code> by copying <code>./nginx</code> to <code>/etc/nginx/conf.d</code> using <code>COPY ./nginx /etc/nginx/conf.d</code> into my container. The issue was because, by using value the nginx.conf refer to log file in my host instead of my container. So, I thought by hardcopying the config file to container it will solve my problem.</p>
  
  <p>However, NGINX is not running at all at <code>docker compose up</code>. What is wrong?</p>
  
  <p>EDIT:</p>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM python:3-onbuild
  
  COPY ./ /app
  COPY ./nginx /etc/nginx/conf.d
  
  RUN chmod +x /app/start_celerybeat.sh
  RUN chmod +x /app/start_celeryd.sh
  RUN chmod +x /app/start_web.sh
  
  RUN pip install -r /app/requirements.txt
  RUN python /app/manage.py collectstatic --noinput
  RUN /app/automation/rm.sh
  </code></pre>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: "3"  
  services:  
    nginx:
      image: nginx:latest
      container_name: nginx_airport
      ports:
        - "8080:8080"
    rabbit:
        image: rabbitmq:latest
        environment:
            - RABBITMQ_DEFAULT_USER=admin
            - RABBITMQ_DEFAULT_PASS=asdasdasd
        ports:
            - "5672:5672"
            - "15672:15672"
    web:
      build:
        context: ./
        dockerfile: Dockerfile
      command: /app/start_web.sh
      container_name: django_airport
      expose:
        - "8080"
      links:
        - rabbit
    celerybeat:
      build: ./
      command: /app/start_celerybeat.sh
      depends_on:
        - web
      links:
        - rabbit
    celeryd:
      build: ./ 
      command: /app/start_celeryd.sh
      depends_on:
        - web
      links:
        - rabbit
  </code></pre>