From 223a713d2c7e52115cbc50ee978fd8d96e968d66 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 2 Jun 2021 15:10:58 +0900 Subject: [PATCH] Update Dockerfiles, fix #1388, fix #1387 --- .dockerignore | 3 +++ backend/Dockerfile.prod | 3 +-- nginx/Dockerfile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 8c91f960..53cfd6bb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,6 +17,9 @@ backend/**/webpack-stats.json backend/**/*.sqlite3 backend/**/.env backend/**/junitxml/ +backend/media +backend/filepond-temp-uploads +backend/stored_uploads backend/**/staticfiles/ backend/**/venv/ backend/**/__pycache__/ diff --git a/backend/Dockerfile.prod b/backend/Dockerfile.prod index e00f56cb..e75ee03b 100644 --- a/backend/Dockerfile.prod +++ b/backend/Dockerfile.prod @@ -29,9 +29,8 @@ RUN apt-get update \ COPY --chown=doccano:doccano tools/ /opt/bin/ RUN mkdir -p /backend/staticfiles \ - && chown -R doccano:doccano /backend/staticfiles \ && mkdir -p /backend/client/dist/static \ - && chown -R doccano:doccano /backend/client/dist/static \ + && mkdir -p /backend/media \ && chown -R doccano:doccano /backend/ USER doccano:doccano diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 6c0b2948..60f6ad7c 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -19,7 +19,8 @@ COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY nginx/default.conf /etc/nginx/conf.d/default.conf RUN chown -R doccano:doccano /var/cache/nginx \ - && chmod -R g+w /var/cache/nginx + && chmod -R g+w /var/cache/nginx \ + && chown -R doccano:doccano /media EXPOSE 8080