File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,13 +6,10 @@ WORKDIR /app
66RUN npm install \
77 && yarn build
88
9-
109FROM docker.io/library/python:3.9-alpine
1110
1211COPY requirements.txt /app/requirements.txt
1312
14- ENV PATH="/app/.venv/bin:${PATH}"
15-
1613RUN apk add --update --virtual .build-deps \
1714 postgresql-dev \
1815 gcc \
@@ -23,12 +20,13 @@ RUN apk add --update --virtual .build-deps \
2320 cargo \
2421 rust \
2522 && python3 -m venv /app/.venv \
23+ && source /app/.venv/bin/activate \
2624 && pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
2725 && runDeps="$( \
28- scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
26+ scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
2927 | tr ',' '\n ' \
3028 | sort -u \
31- | awk 'system(" [ -e /usr/local /lib/" $1 " ]") == 0 { next } { print " so:" $1 }' \
29+ | awk 'system(" [ -e /app/.venv /lib/" $1 " ]") == 0 { next } { print " so:" $1 }' \
3230 )" \
3331 && apk add --update --virtual .passport-rundeps \
3432 $runDeps \
@@ -41,6 +39,8 @@ RUN apk add --update --virtual .build-deps \
4139COPY . /app
4240COPY --from=build-app /app/dist /app/web/dist
4341
42+ ENTRYPOINT ["/app/bin/entrypoint" ]
43+
4444WORKDIR /app
4545CMD ["/app/bin/boot" ]
4646EXPOSE 8000
Original file line number Diff line number Diff line change @@ -18,13 +18,14 @@ RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositor
1818 cargo \
1919 rust \
2020 && python3 -m venv /app/.venv \
21+ && source /app/.venv/bin/activate \
2122 && pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
2223 && pip3 install --disable-pip-version-check --no-cache-dir -r /app/dev_requirements.txt \
2324 && runDeps="$( \
24- scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
25+ scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
2526 | tr ',' '\n' \
2627 | sort -u \
27- | awk 'system("[ -e /usr/local /lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
28+ | awk 'system("[ -e /app/.venv /lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
2829 )" \
2930 && apk add --update --virtual .passport-rundeps \
3031 $runDeps \
@@ -43,6 +44,8 @@ RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositor
4344
4445COPY . /app
4546
47+ ENTRYPOINT ["/app/bin/entrypoint"]
48+
4649WORKDIR /app
4750CMD ["/app/bin/boot"]
4851EXPOSE 8000
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # shellcheck disable=SC1090,SC1091
3+
4+ set -e
5+ source /app/.venv/bin/activate
6+ exec " $@ "
You can’t perform that action at this time.
0 commit comments