Skip to content

Commit 0ffdcfa

Browse files
committed
chore(helmbroker): set venv profile
1 parent 245e6f5 commit 0ffdcfa

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

rootfs/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ ENV PYTHON_VERSION="3.10.2" \
1313
COPY . /app
1414

1515
WORKDIR /app
16-
RUN buildDeps='musl-dev openssl'; \
17-
install-packages $buildDeps \
16+
RUN buildDeps='musl-dev openssl' \
17+
&& install-packages $buildDeps \
1818
&& install-stack python $PYTHON_VERSION \
1919
&& install-stack helm $HELM_VERSION && . init-stack \
2020
&& python3 -m venv /app/.venv \
2121
&& source /app/.venv/bin/activate \
2222
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
23+
&& chown -R drycc:drycc /app \
24+
# set env
25+
&& echo "source /app/.venv/bin/activate" >> /opt/drycc/python/profile.d/python.sh \
2326
# cleanup
2427
&& scanelp /app/.venv/lib > runtime.txt \
2528
&& apt-get purge -y --auto-remove $buildDeps \
@@ -43,5 +46,5 @@ RUN buildDeps='musl-dev openssl'; \
4346

4447
USER drycc
4548
WORKDIR /app
46-
CMD ["PATH=/app/.venv/bin:\$PATH", "/app/bin/boot"]
49+
CMD ["/app/bin/boot"]
4750
EXPOSE 8000

rootfs/Dockerfile.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ RUN buildDeps='musl-dev openssl'; \
2323
&& source /app/.venv/bin/activate \
2424
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
2525
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/dev_requirements.txt \
26+
&& chown -R drycc:drycc /app \
27+
# set env
28+
&& echo "source /app/.venv/bin/activate" >> /opt/drycc/python/profile.d/python.sh \
2629
# cleanup
2730
&& scanelp /app/.venv/lib > runtime.txt \
2831
&& apt-get purge -y --auto-remove $buildDeps \

rootfs/bin/boot

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
# fail hard and fast even on pipelines
77
set -eo pipefail
8-
# shellcheck disable=SC1091
9-
source /app/.venv/bin/activate
108
# spawn a gunicorn server in the background
119
echo ""
1210
echo "Starting up Gunicorn"

rootfs/bin/test-style

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55

66
# fail hard and fast even on pipelines
77
set -eou pipefail
8-
# shellcheck disable=SC1091
9-
source /app/.venv/bin/activate
108
flake8 --show-source --exclude .venv,migrations

rootfs/bin/upload-coverage

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55

66
# fail hard and fast even on pipelines
77
set -eou pipefail
8-
# shellcheck disable=SC1091
9-
source /app/.venv/bin/activate
108

119
codecov --required

0 commit comments

Comments
 (0)