Add local pip cache to avoid repeating downloads
This commit is contained in:
parent
cdb939f233
commit
f837f2229b
|
@ -28,7 +28,7 @@ pipeline:
|
||||||
- cd /var/www/stage/maidstone-hackspace-website
|
- cd /var/www/stage/maidstone-hackspace-website
|
||||||
- git pull
|
- git pull
|
||||||
- docker-compose -fstage.yml build
|
- docker-compose -fstage.yml build
|
||||||
- docker-compose -fstage.yml down
|
- docker-compose -fstage.yml down --remove-orphans
|
||||||
- docker-compose -fstage.yml up -d
|
- docker-compose -fstage.yml up -d
|
||||||
|
|
||||||
publish-live:
|
publish-live:
|
||||||
|
|
|
@ -5,7 +5,7 @@ ENV PYTHONUNBUFFERED 1
|
||||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||||
COPY ./requirements /requirements
|
COPY ./requirements /requirements
|
||||||
|
|
||||||
RUN pip install -r /requirements/production.txt \
|
RUN pip install --cache-dir ./cache/pip -r /requirements/production.txt \
|
||||||
&& groupadd -r django \
|
&& groupadd -r django \
|
||||||
&& useradd -r -g django django
|
&& useradd -r -g django django
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||||
COPY ./requirements /requirements
|
COPY ./requirements /requirements
|
||||||
RUN pip install -r /requirements/local.txt
|
RUN pip install --cache-dir ./cache/pip -r /requirements/local.txt
|
||||||
|
|
||||||
COPY ./compose/django/entrypoint.sh /entrypoint.sh
|
COPY ./compose/django/entrypoint.sh /entrypoint.sh
|
||||||
RUN sed -i 's/\r//' /entrypoint.sh
|
RUN sed -i 's/\r//' /entrypoint.sh
|
||||||
|
|
Loading…
Reference in New Issue