File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ services:
56
56
- PGPASSWORD=password
57
57
- PYTHONPATH=.
58
58
- ITOU_LOG_LEVEL=DEBUG
59
- - ITOU_CACHE=/app/.cache
60
59
- CELLAR_ADDON_HOST=minio:${MINIO_PORT_ON_DOCKER_HOST:-9000}
61
60
- VIRTUAL_ENV=/app/.venv-docker
62
61
- REDIS_URL=redis://redis:6379
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ FROM python:$PYTHON_VERSION-slim
6
6
ARG APP_USER
7
7
ARG APP_DIR
8
8
ARG PG_MAJOR
9
+ ARG XDG_CACHE_HOME="/app_cache"
10
+
11
+ VOLUME $XDG_CACHE_HOME
9
12
10
13
# Inspiration
11
14
# https://github.com/azavea/docker-django/blob/1ef366/Dockerfile-slim.template
@@ -16,6 +19,7 @@ ENV PYTHONUNBUFFERED=1
16
19
# Set ipdb as the default debugger.
17
20
# https://www.andreagrandi.it/2018/10/16/using-ipdb-with-python-37-breakpoint/
18
21
ENV PYTHONBREAKPOINT=ipdb.set_trace
22
+ ENV XDG_CACHE_HOME=$XDG_CACHE_HOME
19
23
20
24
# Install tools to setup the PostgreSQL reposity
21
25
RUN set -ex; \
@@ -49,6 +53,10 @@ RUN set -ex \
49
53
50
54
RUN echo '. "$VIRTUAL_ENV"/bin/activate' >> /home/.bashrc
51
55
56
+ # Setup app cache dir
57
+ RUN mkdir -p $XDG_CACHE_HOME \
58
+ && chown $APP_USER: $XDG_CACHE_HOME
59
+
52
60
# Setup the entrypoint
53
61
COPY --chown=$APP_USER:$APP_USER --chmod=755 ./docker/dev/django/entrypoint.sh /entrypoint.sh
54
62
ENTRYPOINT ["/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments