Browse Source

Part 2: Docker: Try to fix "Failed export and unexpected container restart". Added timezone and localtime.

Thanks to akitzing, mfilser and xet7 !

Fixes #4089
Lauri Ojansivu 3 years ago
parent
commit
e3292dd562
3 changed files with 16 additions and 8 deletions
  1. 5 2
      .devcontainer/docker-compose.yml
  2. 1 3
      docker-compose.yml
  3. 10 3
      torodb-postgresql/docker-compose.yml

+ 5 - 2
.devcontainer/docker-compose.yml

@@ -14,8 +14,8 @@ services:
     volumes:
     volumes:
       - /etc/localtime:/etc/localtime:ro
       - /etc/localtime:/etc/localtime:ro
       - /etc/timezone:/etc/timezone:ro
       - /etc/timezone:/etc/timezone:ro
-      - ./volumes/wekan-db:/data/db
-      - ./volumes/wekan-db-dump:/dump
+      - wekan-db:/data/db
+      - wekan-db-dump:/dump
 
 
   wekan-dev:
   wekan-dev:
     container_name: wekan-dev-app
     container_name: wekan-dev-app
@@ -45,12 +45,15 @@ services:
       - ../i18n:/home/wekan/app/i18n
       - ../i18n:/home/wekan/app/i18n
       - ../server:/home/wekan/app/server
       - ../server:/home/wekan/app/server
       - ../public:/home/wekan/app/public
       - ../public:/home/wekan/app/public
+      - wekan-tmp:/tmp
 
 
 volumes:
 volumes:
   wekan-dev-db:
   wekan-dev-db:
     driver: local
     driver: local
   wekan-dev-db-dump:
   wekan-dev-db-dump:
     driver: local
     driver: local
+  wekan-tmp:
+    driver: local
 
 
 networks:
 networks:
   wekan-dev-tier:
   wekan-dev-tier:

+ 1 - 3
docker-compose.yml

@@ -664,6 +664,7 @@ services:
     volumes:
     volumes:
       - /etc/localtime:/etc/localtime:ro
       - /etc/localtime:/etc/localtime:ro
       - /etc/timezone:/etc/timezone:ro
       - /etc/timezone:/etc/timezone:ro
+      - wekan-tmp:/tmp
 
 
 #---------------------------------------------------------------------------------
 #---------------------------------------------------------------------------------
 # ==== OPTIONAL: SHARE DATABASE TO OFFICE LAN AND REMOTE VPN ====
 # ==== OPTIONAL: SHARE DATABASE TO OFFICE LAN AND REMOTE VPN ====
@@ -721,9 +722,6 @@ volumes:
     driver: local
     driver: local
   wekan-tmp:
   wekan-tmp:
     driver: local
     driver: local
-  - /etc/localtime:/etc/localtime:ro
-  - /etc/timezone:/etc/timezone:ro
-  - ./volumes/wekan-tmp:/tmp
 
 
 networks:
 networks:
   wekan-tier:
   wekan-tier:

+ 10 - 3
torodb-postgresql/docker-compose.yml

@@ -136,6 +136,12 @@ services:
             rs.initiate({_id:"rs1",members:[{_id:0,host:"mongodb:27017"}]});
             rs.initiate({_id:"rs1",members:[{_id:0,host:"mongodb:27017"}]});
         ' 1>/dev/null 2>&1 &
         ' 1>/dev/null 2>&1 &
         mongod --replSet rs1
         mongod --replSet rs1
+    volumes:
+      - /etc/localtime:/etc/localtime:ro
+      - /etc/timezone:/etc/timezone:ro
+      - wekan-db:/data/db
+      - wekan-db-dump:/dump
+
   wekan:
   wekan:
     image: quay.io/wekan/wekan
     image: quay.io/wekan/wekan
     container_name: wekan-app
     container_name: wekan-app
@@ -604,6 +610,10 @@ services:
 
 
     depends_on:
     depends_on:
       - mongodb
       - mongodb
+    volumes:
+      - /etc/localtime:/etc/localtime:ro
+      - /etc/timezone:/etc/timezone:ro
+      - wekan-tmp:/tmp
 
 
 #---------------------------------------------------------------------------------
 #---------------------------------------------------------------------------------
 # ==== OPTIONAL: SHARE DATABASE TO OFFICE LAN AND REMOTE VPN ====
 # ==== OPTIONAL: SHARE DATABASE TO OFFICE LAN AND REMOTE VPN ====
@@ -638,9 +648,6 @@ volumes:
     driver: local
     driver: local
   wekan-tmp:
   wekan-tmp:
     driver: local
     driver: local
-  - /etc/localtime:/etc/localtime:ro
-  - /etc/timezone:/etc/timezone:ro
-  - ./volumes/wekan-tmp:/tmp
 
 
 networks:
 networks:
   wekan-tier:
   wekan-tier: