mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-31 10:19:54 +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 && \
|
||||
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 cd /app && npm install
|
||||
RUN cd /app && grunt build
|
||||
RUN groupadd -r django && useradd -r -g django django
|
||||
ADD . /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
|
||||
|
||||
WORKDIR /app
|
||||
USER django
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
@ -15,4 +15,8 @@ export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRE
|
|||
{% if cookiecutter.use_celery == 'y' %}
|
||||
export CELERY_BROKER_URL=$DJANGO_CACHE_URL
|
||||
{% endif %}
|
||||
|
||||
npm install
|
||||
grunt build
|
||||
|
||||
exec "$@"
|
||||
|
|
Loading…
Reference in New Issue
Block a user