소스 검색

tunning docker volume

Vincent GUFFON 5 년 전
부모
커밋
945364041a
3개의 변경된 파일23개의 추가작업 그리고 13개의 파일을 삭제
  1. 18 13
      docker-compose.yaml
  2. 4 0
      docker/nginx/site.conf
  3. 1 0
      docker/php/Dockerfile

+ 18 - 13
docker-compose.yaml

@@ -81,7 +81,7 @@ services:
       - appdata:/var/www/html/app/cache/
       - appdata:/var/www/html/app/logs/
       # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
-      - ./apps/opentalent-platform:/var/www/html:cached
+      - ./apps/opentalent-platform:/var/www/html:rw,cached
       # A l'inverse, les vendors seront surtout modifiés dans le container
       - ./apps/opentalent-platform/vendor:/var/www/html/vendor:delegated
     depends_on:
@@ -108,7 +108,11 @@ services:
       context: .
       dockerfile: docker/node/Dockerfile
     volumes:
+      - admindata:/home/workspace/dist
+      - admindata:/home/workspace/.tmp
       - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
+      - ./apps/opentalent-admin-2.0/node_modules:/home/workspace/nodes_modules:rw,delegated
+      - ./apps/opentalent-admin-2.0/bower_components:/home/workspace/bower_components:rw,delegated
     tty: true
     ports:
       - 3000:3000
@@ -130,16 +134,16 @@ services:
         - COMPOSER_HASH=${COMPOSER_HASH}
     restart: always
     volumes:
-      - ./docker/typo3/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php
-      - ./apps/typo3/websites:/var/www/html/websites:cached
-      - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
-      - ./apps/typo3/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
-      - ./apps/typo3/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
-      - ./apps/typo3/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
-      - ./apps/typo3/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
-      - ./apps/typo3/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
-      - ./apps/typo3/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
-      - ./apps/typo3/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
+      - ./docker/typo3/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:rw,cached
+      - ./apps/typo3/websites:/var/www/html/websites:rw,cached
+      - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:rw,cached
+      - ./apps/typo3/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:rw,cached
+      - ./apps/typo3/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:rw,cached
+      - ./apps/typo3/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:rw,cached
+      - ./apps/typo3/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:rw,cached
+      - ./apps/typo3/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:rw,cached
+      - ./apps/typo3/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:rw,cached
+      - ./apps/typo3/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:rw,cached
     environment:
       - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
       - HTTPS_METHOD=noredirect
@@ -156,7 +160,7 @@ services:
     restart: always
     volumes:
       - ./apps/opentalent:/var/source/opentalent:rw,cached
-      - ./apps/vendor:/var/source/vendor:rw,cached
+      - ./apps/vendor:/var/source/vendor:rw,delegated
       - ./apps/opentalent-config:/var/source/config:rw,cached
     environment:
       - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
@@ -200,4 +204,5 @@ volumes:
   mysqldata: ~
   elasticsearchdata: ~
   # On rajoute un volume (de données non accessibles en dehors)
-  appdata: ~
+  appdata: ~
+  admindata: ~

+ 4 - 0
docker/nginx/site.conf

@@ -4,6 +4,8 @@ server {
     location / {
         # try to serve file directly, fallback to app.php
         try_files $uri /app_dev.php$is_args$args;
+
+        http2_push_preload on;
     }
 
     # DEV
@@ -22,6 +24,8 @@ server {
         # for more information).
         fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
         fastcgi_param DOCUMENT_ROOT $realpath_root;
+
+        http2_push_preload on;
     }
 
     # return 404 for all other php files not matching the front controller

+ 1 - 0
docker/php/Dockerfile

@@ -67,5 +67,6 @@ CMD if [ "x$OS" = "MAC" ] ; then HTTPDUSER=$(ps axo user,comm | grep -E '[a]pach
     php-fpm; \
     else HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1); \
     setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs && setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs;\
+    chown -R www-data:www-data /var/www/html/web; \
     php-fpm; \
     fi;