Skip to content

Commit f439b03

Browse files
committed
Add nodejs/npm into build scripts
1 parent 32945b5 commit f439b03

File tree

6 files changed

+121
-1
lines changed

6 files changed

+121
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,6 @@ cython_debug/
172172

173173
# Misc
174174
.DS_Store
175+
176+
# Node packages
177+
node_modules

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
55
ENV PYTHONDONTWRITEBYTECODE=1
66
ENV PYTHONUNBUFFERED=1
77

8+
# Add nodejs v22
9+
RUN apt-get update \
10+
&& apt-get install -y curl gnupg \
11+
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
12+
&& apt-get install -y nodejs \
13+
&& apt-get clean \
14+
&& rm -rf /var/lib/apt/lists/*
15+
816
WORKDIR /app
917

1018
# Copy the project into the image
@@ -16,4 +24,4 @@ RUN find /app -name "*.sqlite3" -delete
1624
# Sync the project into a new environment, using the frozen lockfile
1725
RUN uv sync --frozen
1826

19-
ENTRYPOINT [ "/app/entrypoint.sh" ]
27+
ENTRYPOINT [ "/app/entrypoint.sh" ]

deploy_prod.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ mkdir -p ${LOG_DIR}
2424

2525
# update changes before update
2626
# git pull
27+
npm install
2728
source .venv/bin/activate
2829
uv sync
2930
cd pythonkr_backend

entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
cd /app
5+
npm install
56
source .venv/bin/activate
67
uv sync
78
cd /app/pythonkr_backend

package-lock.json

Lines changed: 102 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"devDependencies": {
3+
"cross-env": "^7.0.3"
4+
}
5+
}

0 commit comments

Comments
 (0)