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
@@ -73,6 +72,7 @@ services:
73
72
volumes :
74
73
# Mount the current directory into `/app` inside the running container.
75
74
- .:/app
75
+ - cache:/app_cache
76
76
restart : unless-stopped
77
77
ports :
78
78
- " 127.0.0.1:${DJANGO_PORT_ON_DOCKER_HOST:-8000}:8000"
@@ -86,3 +86,4 @@ services:
86
86
volumes :
87
87
postgres_data :
88
88
itou_minio :
89
+ cache :
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ 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"
9
10
10
11
# Inspiration
11
12
# https://github.com/azavea/docker-django/blob/1ef366/Dockerfile-slim.template
@@ -16,6 +17,7 @@ ENV PYTHONUNBUFFERED=1
16
17
# Set ipdb as the default debugger.
17
18
# https://www.andreagrandi.it/2018/10/16/using-ipdb-with-python-37-breakpoint/
18
19
ENV PYTHONBREAKPOINT=ipdb.set_trace
20
+ ENV XDG_CACHE_HOME=$XDG_CACHE_HOME
19
21
20
22
# Install tools to setup the PostgreSQL reposity
21
23
RUN set -ex; \
@@ -49,6 +51,10 @@ RUN set -ex \
49
51
50
52
RUN echo '. "$VIRTUAL_ENV"/bin/activate' >> /home/.bashrc
51
53
54
+ # Setup app cache dir
55
+ RUN mkdir -p $XDG_CACHE_HOME \
56
+ && chown $APP_USER: $XDG_CACHE_HOME
57
+
52
58
# Setup the entrypoint
53
59
COPY --chown=$APP_USER:$APP_USER --chmod=755 ./docker/dev/django/entrypoint.sh /entrypoint.sh
54
60
ENTRYPOINT ["/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments