mike dupont commited on
Commit
08c4b8d
1 Parent(s): 36f22ee
Files changed (3) hide show
  1. Dockerfile +6 -17
  2. package-lock.json +0 -0
  3. package.json +0 -38
Dockerfile CHANGED
@@ -1,28 +1,17 @@
1
  FROM node:20-alpine AS builder
2
  RUN apk add --no-cache libc6-compat
3
  WORKDIR /app
 
 
 
 
4
 
5
- # Install dependencies based on the preferred package manager
6
- COPY src src
7
- COPY public public
8
- COPY package.json package.json
9
- COPY package-lock.json package-lock.json
10
- COPY style.css style.css
11
- COPY index.js index.js
12
- COPY index.html index.html
13
- RUN \
14
- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
15
- elif [ -f package-lock.json ]; then npm ci; \
16
- elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
17
- else echo "Lockfile not found." && exit 1; \
18
- fi
19
 
20
- RUN npm run build
21
  FROM python:3.10-slim AS backend
22
  WORKDIR /app
23
 
24
  RUN apt-get update && apt-get install --no-install-recommends -y \
25
- git ffmpeg curl gnupg \
26
  && apt-get clean && rm -rf /var/lib/apt/lists/*
27
 
28
  RUN useradd -m -u 1000 user
@@ -37,7 +26,7 @@ ENV HOME=/home/user \
37
 
38
  WORKDIR $HOME/app
39
  COPY --from=builder /app/build ./static
40
- COPY . .
41
 
42
  CMD ["python", "app.py"]
43
 
 
1
  FROM node:20-alpine AS builder
2
  RUN apk add --no-cache libc6-compat
3
  WORKDIR /app
4
+ COPY frontend .
5
+ # fold the frontend into app for this container
6
+ RUN npm ci
7
+ RUN npm run build
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
 
10
  FROM python:3.10-slim AS backend
11
  WORKDIR /app
12
 
13
  RUN apt-get update && apt-get install --no-install-recommends -y \
14
+ git curl \
15
  && apt-get clean && rm -rf /var/lib/apt/lists/*
16
 
17
  RUN useradd -m -u 1000 user
 
26
 
27
  WORKDIR $HOME/app
28
  COPY --from=builder /app/build ./static
29
+ COPY app.py app.py
30
 
31
  CMD ["python", "app.py"]
32
 
package-lock.json DELETED
The diff for this file is too large to render. See raw diff
 
package.json DELETED
@@ -1,38 +0,0 @@
1
- {
2
- "name": "introspector",
3
- "version": "0.1.0",
4
- "private": true,
5
- "dependencies": {
6
- "@testing-library/jest-dom": "^5.17.0",
7
- "@testing-library/react": "^13.4.0",
8
- "@testing-library/user-event": "^13.5.0",
9
- "react": "^18.3.1",
10
- "react-dom": "^18.3.1",
11
- "react-scripts": "5.0.1",
12
- "web-vitals": "^2.1.4"
13
- },
14
- "scripts": {
15
- "start": "react-scripts start",
16
- "build": "react-scripts build",
17
- "test": "react-scripts test",
18
- "eject": "react-scripts eject"
19
- },
20
- "eslintConfig": {
21
- "extends": [
22
- "react-app",
23
- "react-app/jest"
24
- ]
25
- },
26
- "browserslist": {
27
- "production": [
28
- ">0.2%",
29
- "not dead",
30
- "not op_mini all"
31
- ],
32
- "development": [
33
- "last 1 chrome version",
34
- "last 1 firefox version",
35
- "last 1 safari version"
36
- ]
37
- }
38
- }