diff --git a/Dockerfile b/Dockerfile index 84ff328bc..e68023da7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -140,7 +140,8 @@ ENV BUILD_DEPS="apt-utils libarchive-tools gnupg gosu wget curl bzip2 g++ build- SAML_ATTRIBUTES="" \ ORACLE_OIM_ENABLED=false \ WAIT_SPINNER="" \ - NODE_OPTIONS="--max_old_space_size=4096" + NODE_OPTIONS="--max_old_space_size=4096" \ + WRITABLE_PATH=/data #--------------------------------------------------------------------- # https://github.com/wekan/wekan/issues/3585#issuecomment-1021522132 @@ -216,7 +217,7 @@ RUN \ mv node-${NODE_VERSION}-${ARCHITECTURE} /opt/nodejs && \ ln -s /opt/nodejs/bin/node /usr/bin/node && \ ln -s /opt/nodejs/bin/npm /usr/bin/npm && \ - mkdir -p /opt/nodejs/lib/node_modules/fibers/.node-gyp /root/.node-gyp/8.16.1 /home/wekan/.config && \ + mkdir -p /opt/nodejs/lib/node_modules/fibers/.node-gyp /root/.node-gyp/${NODE_VERSION} /home/wekan/.config && \ chown wekan --recursive /home/wekan/.config && \ \ #DOES NOT WORK: paxctl fix for alpine linux: https://github.com/wekan/wekan/issues/1303 @@ -323,7 +324,9 @@ RUN \ rm -R /var/lib/apt/lists/* && \ rm -R /home/wekan/.meteor && \ rm -R /home/wekan/app && \ - rm -R /home/wekan/app_build + rm -R /home/wekan/app_build && \ + mkdir /data && \ + chown wekan --recursive /data #cat /home/wekan/python/esprima-python/files.txt | xargs rm -R && \ #rm -R /home/wekan/python #rm /home/wekan/install_meteor.sh diff --git a/docker-compose.yml b/docker-compose.yml index 1dbd11233..b1f454cfc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -144,6 +144,11 @@ services: # remove port mapping if you use nginx reverse proxy, port 8080 is already exposed to wekan-tier network - 80:8080 environment: + #----------------------------------------------------------------- + # ==== WRITEABLE PATH FOR FILE UPLOADS ==== + - WRITABLE_PATH=/data + #----------------------------------------------------------------- + # ==== MONGO_URL ==== - MONGO_URL=mongodb://wekandb:27017/wekan #--------------------------------------------------------------- # ==== ROOT_URL SETTING ==== @@ -325,9 +330,6 @@ services: # When browser policy is enabled, HTML code at this Trusted URL can have iframe that embeds Wekan inside. #- TRUSTED_URL=https://intra.example.com #----------------------------------------------------------------- - # ==== WRITEABLE PATH FOR FILE UPLOADS ==== - - WRITABLE_PATH=/data - #----------------------------------------------------------------- # ==== OUTGOING WEBHOOKS ==== # What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue #- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,commentId @@ -673,7 +675,7 @@ services: - wekandb volumes: - /etc/localtime:/etc/localtime:ro - - ./volumes/data:/data + - wekan-files:/data:rw #--------------------------------------------------------------------------------- # ==== OPTIONAL: SHARE DATABASE TO OFFICE LAN AND REMOTE VPN ==== @@ -725,6 +727,8 @@ services: ## - ./nginx/ssl/pphrase:/etc/nginx/conf.d/ssl/pphrase:ro volumes: + wekan-files: + driver: local wekan-db: driver: local wekan-db-dump: