1- FROM python:3.7
1+ # build stage that generates quasar assets
2+ FROM node:10-alpine as build-stage
3+ ENV HTTP_PROTOCOL http
4+ ENV WS_PROTOCOL ws
5+ ENV DOMAIN_NAME localhost:8000
6+ WORKDIR /app/
7+ COPY quasar/package.json /app/
8+ RUN npm cache verify
9+ RUN npm install -g @quasar/cli
10+ RUN npm install --progress=false
11+ COPY quasar /app/
12+ RUN quasar build -m pwa
13+
14+ # this image is tagged and pushed to the production registry (such as ECR)
15+ FROM python:3.7 as production
216ENV PYTHONUNBUFFERED 1
317ENV PYTHONDONTWRITEBYTECODE 1
418RUN mkdir /code
519WORKDIR /code
6- COPY requirements/base.txt /code/requirements/
20+ COPY backend/ requirements/base.txt /code/requirements/
721RUN python3 -m pip install --upgrade pip
822RUN pip install -r requirements/base.txt
9- COPY scripts/prod/start_prod.sh scripts/dev/start_ci.sh scripts/dev/start_asgi.sh /
10- ADD . /code/
23+ COPY backend/scripts/prod/start_prod.sh \
24+ backend/scripts/dev/start_ci.sh \
25+ backend/scripts/dev/start_asgi.sh \
26+ /
27+ ADD backend /code/
28+
29+ # this stage is used for integration testing
30+ FROM production as gitlab-ci
31+ # cypress dependencies
32+ # RUN apt-get -qq update
33+ # RUN apt-get -qq install -y xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
34+ # add static files from build
35+ COPY --from=build-stage /app/dist/pwa/index.html /code/templates/
36+ # COPY --from=build-stage /app/dist/pwa /code/static
37+ COPY --from=build-stage /app/dist/pwa /static
38+ # index.html is listed here
39+ RUN ls /code/templates/ -al
40+ # also tried this, but still nothing in the templates directory when the container is started
41+ RUN cp /static/index.html /code/templates/index.html
0 commit comments