mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-02 03:00:23 +03:00
npm install & grunt build moved to entrypoint
This commit is contained in:
parent
26036319ad
commit
d41ac3b508
|
@ -25,13 +25,10 @@ RUN \
|
||||||
npm install -g npm && \
|
npm install -g npm && \
|
||||||
printf '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc
|
printf '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc
|
||||||
|
|
||||||
RUN groupadd -r django && useradd -r -g django django
|
|
||||||
ADD . /app
|
|
||||||
|
|
||||||
RUN npm install -g grunt grunt-cli
|
RUN npm install -g grunt grunt-cli
|
||||||
|
|
||||||
RUN cd /app && npm install
|
RUN groupadd -r django && useradd -r -g django django
|
||||||
RUN cd /app && grunt build
|
ADD . /app
|
||||||
|
|
||||||
RUN chown -R django /app
|
RUN chown -R django /app
|
||||||
|
|
||||||
|
@ -42,5 +39,6 @@ RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh
|
||||||
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
|
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
USER django
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
@ -15,4 +15,8 @@ export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRE
|
||||||
{% if cookiecutter.use_celery == 'y' %}
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
export CELERY_BROKER_URL=$DJANGO_CACHE_URL
|
export CELERY_BROKER_URL=$DJANGO_CACHE_URL
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
npm install
|
||||||
|
grunt build
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user