mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Fix building server and web app dev container
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
ARG PYTHON_VERSION=3.10
|
||||
FROM mcr.microsoft.com/devcontainers/python:${PYTHON_VERSION}
|
||||
|
||||
# Install Node.js and Yarn
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
||||
apt-get install -y nodejs
|
||||
|
||||
# Setup working directory
|
||||
WORKDIR /workspace
|
||||
|
||||
# --- Python Server App Dependencies ---
|
||||
@@ -28,8 +33,8 @@ RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.tom
|
||||
COPY src/interface/web/package.json src/interface/web/yarn.lock ./src/interface/web/
|
||||
|
||||
# Install web app dependencies
|
||||
# note: node and yarn will be available from the "features" in devcontainer.json
|
||||
RUN yarn install --cwd ./src/interface/web && yarn export --cwd ./src/interface/web
|
||||
# note: yarn will be available from the "features" in devcontainer.json
|
||||
RUN yarn install --cwd ./src/interface/web
|
||||
|
||||
# The .venv and node_modules are now populated in the image.
|
||||
# The rest of the source code will be mounted by VS Code from your local checkout,
|
||||
|
||||
@@ -80,10 +80,6 @@
|
||||
},
|
||||
"postCreateCommand": "scripts/dev_setup.sh",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers-contrib/features/black:2": {},
|
||||
"ghcr.io/devcontainers-contrib/features/mypy:2": {},
|
||||
"ghcr.io/devcontainers-contrib/features/isort:2": {},
|
||||
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "lts",
|
||||
|
||||
Reference in New Issue
Block a user