You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems like such a neat solution to incorporating Vue.js into a django app. I'm wondering if you could show an example of how you'd incorporate this into a Docker based setup. I've got it working just fine for my dev image, but I'm having trouble understanding how to make it build the files for production so that they're actually served from the static directory instead of from the webpack dev-server.
My super basic Dockerfile for django is below:
# pull official base image
FROM python:3.8.3-alpine
# set work directory
WORKDIR /usr/src/app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN apk update \
&& apk add postgresql-dev gcc python3-dev musl-dev
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
COPY ./entrypoint.sh .
# copy project
COPY . .
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
Do I just add?
ENV NODE_ENV = 'production'
RUN cd frontend
RUN yarn build
RUN cd ..
NB: My frontend directory lives inside of the app/ directory so it gets copied over in the "copy project" step.
The text was updated successfully, but these errors were encountered:
This seems like such a neat solution to incorporating Vue.js into a django app. I'm wondering if you could show an example of how you'd incorporate this into a Docker based setup. I've got it working just fine for my dev image, but I'm having trouble understanding how to make it build the files for production so that they're actually served from the static directory instead of from the webpack dev-server.
My super basic Dockerfile for django is below:
Do I just add?
NB: My frontend directory lives inside of the app/ directory so it gets copied over in the "copy project" step.
The text was updated successfully, but these errors were encountered: