-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(node): update node version to lts/iron and update related depen…
…dancy
- Loading branch information
Showing
7 changed files
with
4,229 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
lts/carbon | ||
lts/iron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# [Node Stage to get node_modolues and node dependencies] | ||
FROM node:20.11.0-bullseye as node_stage | ||
|
||
COPY ./yarn.lock yarn.lock | ||
COPY ./package.json package.json | ||
|
||
RUN corepack enable | ||
RUN yarn install --immutable | ||
|
||
# [Python Stage for Django web server] | ||
FROM python:3.10.14-slim-bullseye as python_stage | ||
|
||
WORKDIR /app | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
POETRY_HOME="/opt/poetry" \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=true \ | ||
POETRY_NO_INTERACTION=1 | ||
|
||
# Infrastructure tools | ||
# gettext is used for django to compile .po to .mo files. | ||
RUN apt-get update | ||
RUN apt-get install -y \ | ||
libpq-dev \ | ||
gcc \ | ||
zlib1g-dev \ | ||
libjpeg62-turbo-dev \ | ||
mime-support \ | ||
gettext \ | ||
libxml2-dev \ | ||
libxslt-dev | ||
|
||
# Install Poetry | ||
RUN pip install --no-cache-dir pip==23.3.2 && \ | ||
pip install --no-cache-dir poetry==1.8.2 | ||
|
||
# Install Python dependencies | ||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry install --no-root && \ | ||
yes | poetry cache clear --all pypi | ||
|
||
# Add poetry bin directory to PATH | ||
ENV PATH="${WORKDIR}/.venv/bin:$PATH" | ||
|
||
COPY --from=node_stage /node_modules ./node_modules | ||
COPY --from=node_stage /usr/local/bin/node /usr/local/bin/node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.