Advertisement
Guest User

Untitled

a guest
May 7th, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. # nginx -v
  2. nginx version: nginx/1.4.6 (Ubuntu)
  3.  
  4. # docker version
  5. Client:
  6. Version: 1.11.1
  7. API version: 1.23
  8. Go version: go1.5.4
  9. Git commit: 5604cbe
  10. Built: Tue Apr 26 23:30:23 2016
  11. OS/Arch: linux/amd64
  12.  
  13. Server:
  14. Version: 1.11.1
  15. API version: 1.23
  16. Go version: go1.5.4
  17. Git commit: 5604cbe
  18. Built: Tue Apr 26 23:30:23 2016
  19. OS/Arch: linux/amd64
  20.  
  21. # docker-compose -version
  22. docker-compose version 1.7.1, build 0a9ab35
  23.  
  24. piwik_db:
  25. image: mysql
  26. volumes:
  27. - ./mysql/runtime:/var/lib/mysql
  28. environment:
  29. MYSQL_ROOT_PASSWORD: P@ssR00t
  30. MYSQL_DATABASE: analytics
  31. MYSQL_USER: admin
  32. MYSQL_PASSWORD: P@ssUser
  33. app:
  34. image: piwik
  35. links:
  36. - piwik_db:mysql
  37. volumes:
  38. - ./config:/var/www/html/config
  39. - ./ssmtp.conf:/etc/ssmtp/ssmtp.conf
  40. - ./revaliases:/etc/ssmtp/revaliases
  41. web:
  42. image: nginx
  43. volumes:
  44. - ./nginx.conf:/etc/nginx/nginx.conf:ro
  45. - ./etc/letsencrypt:/etc/letsencrypt
  46. links:
  47. - app
  48. volumes_from:
  49. - app
  50. ports:
  51. - "8000:443"
  52. cron:
  53. image: piwik
  54. links:
  55. - piwik_db:mysql
  56. volumes_from:
  57. - app
  58. entrypoint: |
  59. bash -c 'bash -s <<EOF
  60. trap "break;exit" SIGHUP SIGINT SIGTERM
  61. while /bin/true; do
  62. su -s "/bin/bash" -c "/usr/local/bin/php /var/www/html/console core:archive" www-data
  63. sleep 3600
  64. done
  65. EOF'
  66.  
  67. ERROR: for web rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: not a directory"
  68. Traceback (most recent call last):
  69. File "<string>", line 3, in <module>
  70. File "compose/cli/main.py", line 63, in main
  71. AttributeError: 'ProjectError' object has no attribute 'msg'
  72. docker-compose returned -1
  73.  
  74. # docker ps
  75. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  76. f0388c2a89d3 piwik "bash -c 'bash -s <<E" About a minute ago Up 59 seconds 9000/tcp htdocs_cron_1
  77. ef5d6c8c6e74 mysql "docker-entrypoint.sh" About a minute ago Up About a minute 3306/tcp htdocs_piwik_db_1
  78.  
  79. server {
  80. listen 80;
  81. listen [::]:80;
  82.  
  83. server_name piwik.domain.com;
  84. # Redirige le HTTP vers le HTTPS #
  85. return 301 https://$server_name$request_uri;
  86. }
  87. server {
  88.  
  89. ##
  90. # config SSL
  91. ##
  92.  
  93. listen 443 ssl;
  94. ssl_certificate /etc/letsencrypt/live/piwik.domain.com.com/fullchain.pem;
  95. ssl_certificate_key /etc/letsencrypt/live/piwik.domain.com.com/privkey.pem;
  96. keepalive_timeout 70;
  97. ssl_session_cache shared:SSL:10m;
  98. ssl_session_timeout 10m;
  99. fastcgi_param HTTPS on;
  100. # add Strict-Transport-Security to prevent man in the middle attacks
  101. add_header Strict-Transport-Security "max-age=31536000";
  102.  
  103. server_name piwik.domain.com.com;
  104. server_name_in_redirect off;
  105.  
  106. root /usr/share/nginx/html/piwik.domain.com.com/htdocs;
  107. index index.php index.html index.htm;
  108.  
  109. # Logs
  110. access_log /var/log/analytics.access_log;
  111. error_log /var/log/analytics.error_log;
  112.  
  113. # Default location settings
  114. location / {
  115. try_files $uri $uri/ /index.php?$args;
  116. charset utf-8;
  117. client_max_body_size 20M;
  118. }
  119.  
  120. # Images and static content is treated different
  121. location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico|html|woff|woff2|ttf|svg|eot|otf)$ {
  122. add_header Access-Control-Allow-Origin *;
  123. expires 360d;
  124. access_log off;
  125. add_header Cache-Control "public";
  126. }
  127.  
  128. # Deny access to .htaccess files, if Apache's document root
  129. location ~ /.ht {
  130. deny all;
  131. }
  132.  
  133. location ~ /(libraries|setup/frames|setup/libs) {
  134. deny all;
  135. return 404;
  136. }
  137.  
  138. # Pass the PHP scripts to FastCGI server
  139. location ~* .php$ {
  140. # Prevent Zero-day exploit
  141. try_files $uri =404;
  142. #
  143. fastcgi_split_path_info ^(.+?.php)(/.*)$;
  144. if (!-f $document_root$fastcgi_script_name) {
  145. return 404;
  146. }
  147. fastcgi_pass unix:/var/run/php5-fpm.sock;
  148. fastcgi_index index.php;
  149. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  150. include /etc/nginx/fastcgi_params;
  151. }
  152.  
  153. # Redirect server error pages to the static page
  154. error_page 403 /403.html;
  155. error_page 404 /404.html;
  156. error_page 500 502 503 504 /50x.html;
  157.  
  158. # Exclude from the logs to avoid bloating when it's not available
  159. include drop.conf;
  160.  
  161. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement