2016-10-25 2 views
0

광산 캐벗 - 502 불량 게이트웨이 오류

redis: 
    image: redis 
    restart: always 

    db: 
    image: postgres 
    restart: always 
    ports: 
     - "5432:5432" 
    restart: always 
    environment: 
     POSTGRES_PASSWORD: test 
     POSTGRES_USER: test 
     POSTGRES_DB: tests 

    cabot: 
     build: . 
     restart: always 
     links: 
      - redis:celerybroker 
      - db 
      - redis 
     env_file: cabot_env 
     ports: 
      - "5000:5000" 

    nginx: 
    image: nginx 
    ports: 
     - "9999:8088" 
    links: 
     - cabot 
    volumes_from: 
     - cabot 
    volumes: 
     - ./nginx.conf:/etc/nginx/nginx.conf:ro 
     - ./cabot/static/:/code/static:ro 

일시적으로 내가 502 불량 게이트웨이를 얻고있다

worker_processes 1; 
error_log stderr notice; 

events { 
    worker_connections 1024; 
} 

http { 

    types_hash_max_size 2048; 

    upstream cabot_app { 
    server cabot:5000 max_fails=3 fail_timeout=3s; 
    } 

    server { 
    listen 8088; 

    location/{ 
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
     proxy_set_header Host $http_host; 
     proxy_redirect off; 
     proxy_pass http://cabot_app; 
    } 

    location /static/ { 
     include  /etc/nginx/mime.types; 
     default_type application/octet-stream; 
     root /code/; 
    } 
    } 
} 

및 고정 표시기-작성 YAML 파일

파일 nginx.conf. 페이지를 새로 고침하면 페이지가 사라집니다. Nginx에 파일을 기록

을 제공합니다

/code/static/CACHE/css/base.36481a0991d5.css는 "실패 (2 : 그런 파일이나 디렉토리)

+0

업스트림에서 응답 헤더를 읽는 중 일찍 업스트림으로 닫힌 연결이 있습니다. "클라이언트 : server :" "" – pythonhmmm

답변

0

내가 cabot에 익숙하지 않은 해요. 그러나 오류를 cabotdjango-compressor (확실하지)를 사용하고 있습니다. 그리고 django-compressorCACHE 파일이 아직 생성되지 않은 것 같습니다 로그인합니다.

당신은 압축 된 CSS/JS 파일을 생성하는 추가 단계를 추가해야 할 수 있습니다.

python manage.py compress 
+0

압축이 제대로 작동하는 것 같습니다. – pythonhmmm

+0

압축이 제대로 작동하는 것 같습니다. 업스트림에 연결하는 동안 오류 "connect() failed (111 : Connection refused) failed, 클라이언트" – pythonhmmm

관련 문제