-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Upgrade to Python 3.11 and fix most existing vulnerabilities #7510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 4 commits
dc8ea52
ff5a42b
1511b27
104029f
95bd334
3bd4bc3
01641d8
9ac9c3c
fdd2045
7f08253
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:18-bookworm AS frontend-builder | ||
FROM node:20-bookworm AS frontend-builder | ||
|
||
RUN npm install --global --force [email protected] | ||
|
||
|
@@ -19,6 +19,7 @@ COPY --chown=redash scripts /frontend/scripts | |
# Controls whether to instrument code for coverage information | ||
ARG code_coverage | ||
ENV BABEL_ENV=${code_coverage:+test} | ||
ENV GITHUB_PAT=${GITHUB_PAT} | ||
|
||
# Avoid issues caused by lags in disk and network I/O speeds when working on top of QEMU emulation for multi-platform image building. | ||
RUN yarn config set network-timeout 300000 | ||
|
@@ -37,7 +38,7 @@ RUN <<EOF | |
fi | ||
EOF | ||
|
||
FROM python:3.10-slim-bookworm | ||
FROM python:3.11-slim-bookworm | ||
|
||
EXPOSE 5000 | ||
|
||
|
@@ -98,18 +99,18 @@ WORKDIR /app | |
ENV POETRY_VERSION=1.8.3 | ||
ENV POETRY_HOME=/etc/poetry | ||
ENV POETRY_VIRTUALENVS_CREATE=false | ||
ENV PIP_PREFER_BINARY=1 | ||
RUN curl -sSL https://install.python-poetry.org | python3 - | ||
|
||
# Avoid crashes, including corrupted cache artifacts, when building multi-platform images with GitHub Actions. | ||
RUN /etc/poetry/bin/poetry cache clear pypi --all | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this still required? |
||
|
||
# Use BuildKit cache mount for Poetry cache to speed up builds | ||
COPY pyproject.toml poetry.lock ./ | ||
|
||
ARG POETRY_OPTIONS="--no-root --no-interaction --no-ansi" | ||
ARG POETRY_OPTIONS="--no-root --no-ansi --no-interaction" | ||
# for LDAP authentication, install with `ldap3` group | ||
# disabled by default due to GPL license conflict | ||
ARG install_groups="main,all_ds,dev" | ||
RUN /etc/poetry/bin/poetry install --only $install_groups $POETRY_OPTIONS | ||
RUN --mount=type=cache,target=/root/.cache/pypoetry \ | ||
/etc/poetry/bin/poetry install --only $install_groups $POETRY_OPTIONS | ||
|
||
|
||
COPY --chown=redash . /app | ||
COPY --from=frontend-builder --chown=redash /frontend/client/dist /app/client/dist | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,14 @@ x-redash-service: &redash-service | |
context: . | ||
args: | ||
skip_frontend_build: "true" # set to empty string to build | ||
# Enable BuildKit for faster builds with cache mounts | ||
dockerfile: Dockerfile | ||
volumes: | ||
- .:/app | ||
env_file: | ||
- .env | ||
x-redash-environment: &redash-environment | ||
REDASH_HOST: http://localhost:5001 | ||
REDASH_HOST: http://localhost:5000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is 5001 now the default? Restore this. |
||
REDASH_LOG_LEVEL: "INFO" | ||
REDASH_REDIS_URL: "redis://redis:6379/0" | ||
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres" | ||
|
@@ -29,7 +31,7 @@ services: | |
- postgres | ||
- redis | ||
ports: | ||
- "5001:5000" | ||
- "5000:5000" | ||
- "5678:5678" | ||
environment: | ||
<<: *redash-environment | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably now be removed, I don't think it's required.