Skip to content

Commit

Permalink
Fix up client bits
Browse files Browse the repository at this point in the history
  • Loading branch information
ipmb committed Feb 9, 2024
1 parent 537b888 commit 1c117f4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# STAGE 1: BUILD NODE
FROM node:18-alpine as build-node
FROM node:20-alpine as build-node

WORKDIR /home/node/app
COPY package-lock.json package.json ./
WORKDIR /home/node/app/client
COPY client/package-lock.json client/package.json ./
RUN set -ex && npm install -g npm@latest && npm ci
COPY client/ ./client
RUN set -ex && npm run build && npm test
COPY client/ ./
RUN npm run build


# STAGE 2: BUILD PYTHON
Expand All @@ -25,5 +25,7 @@ COPY {{ project_name }}/__init__.py ./{{ project_name }}/
RUN pip install --no-deps -e .

COPY . ./
COPY --from=build-node /home/node/app/client/dist ./client/dist
RUN SECRET_KEY=s python manage.py collectstatic --noinput

CMD /app/.venv/bin/manage.py runserver 0.0.0.0:8000
13 changes: 13 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "{{ project_name }}",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "echo \"Your client build command goes here\" && mkdir dist",
"dev": "node -e \"console.log('Your client build/watch process goes here'); setInterval(() => {}, 99999999);\""
},
"author": "",
"license": "ISC",
"dependencies": {}
}
5 changes: 0 additions & 5 deletions package-lock.json

This file was deleted.

21 changes: 0 additions & 21 deletions package.json

This file was deleted.

0 comments on commit 1c117f4

Please sign in to comment.