Use storage under /data
This commit is contained in:
parent
127a9ab8ec
commit
929d279b24
2 changed files with 8 additions and 8 deletions
|
@ -35,14 +35,14 @@ RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/gmba_django/wheels -
|
||||||
FROM python:3.9.6-alpine
|
FROM python:3.9.6-alpine
|
||||||
|
|
||||||
# create directory for the app user
|
# create directory for the app user
|
||||||
RUN mkdir -p /home/app
|
RUN mkdir -p /data/app
|
||||||
|
|
||||||
# create the app user
|
# create the app user
|
||||||
RUN addgroup -S app && adduser -S app -G app
|
RUN addgroup -S app && adduser -S app -G app
|
||||||
|
|
||||||
# create the appropriate directories
|
# create the appropriate directories
|
||||||
ENV HOME=/home/app
|
ENV HOME=/data/app
|
||||||
ENV APP_HOME=/home/app/app
|
ENV APP_HOME=/data/app/app
|
||||||
RUN mkdir $APP_HOME
|
RUN mkdir $APP_HOME
|
||||||
RUN mkdir $APP_HOME/static
|
RUN mkdir $APP_HOME/static
|
||||||
RUN mkdir $APP_HOME/media
|
RUN mkdir $APP_HOME/media
|
||||||
|
|
|
@ -7,8 +7,8 @@ services:
|
||||||
dockerfile: Dockerfile.prod
|
dockerfile: Dockerfile.prod
|
||||||
command: gunicorn gmba_django.wsgi:application --bind [::]:8000
|
command: gunicorn gmba_django.wsgi:application --bind [::]:8000
|
||||||
volumes:
|
volumes:
|
||||||
- static_volume:/home/app/app/static
|
- static_volume:/data/app/app/static
|
||||||
- media_volume:/home/app/app/media
|
- media_volume:/data/app/app/media
|
||||||
expose:
|
expose:
|
||||||
- 8000
|
- 8000
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -18,14 +18,14 @@ services:
|
||||||
db:
|
db:
|
||||||
image: postgres:13.0-alpine
|
image: postgres:13.0-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data/
|
- postgres_data:/data/var/lib/postgresql/data/
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env.prod
|
- ./.env.prod
|
||||||
nginx:
|
nginx:
|
||||||
build: ./nginx
|
build: ./nginx
|
||||||
volumes:
|
volumes:
|
||||||
- static_volume:/home/app/app/static
|
- static_volume:/data/app/app/static
|
||||||
- media_volume:/home/app/app/media
|
- media_volume:/data/app/app/media
|
||||||
ports:
|
ports:
|
||||||
- 1337:80
|
- 1337:80
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
Loading…
Reference in a new issue