mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-10-25 17:13:47 +00:00
Merge pull request #90 from 9technologygroup/fix/locks_and_docker
fix: Revert Dockerfile edits and lockfile changes
This commit is contained in:
9
.github/workflows/docker.yml
vendored
9
.github/workflows/docker.yml
vendored
@@ -8,6 +8,13 @@ on:
|
|||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
push:
|
||||||
|
description: Push images to registry
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
@@ -30,6 +37,7 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to Container Registry
|
||||||
|
if: github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
@@ -51,6 +59,7 @@ jobs:
|
|||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Build and push ${{ matrix.image }} image
|
- name: Build and push ${{ matrix.image }} image
|
||||||
|
if: github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true'
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|||||||
2436
backend/package-lock.json
generated
2436
backend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,19 +4,13 @@ RUN apk add --no-cache openssl
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy backend package files
|
COPY --chown=node:node package*.json /app/
|
||||||
COPY --chown=node:node backend/package*.json /app/backend/
|
COPY --chown=node:node backend/ /app/backend/
|
||||||
|
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
|
|
||||||
# Install backend dependencies (now has its own package-lock.json)
|
RUN npm ci --ignore-scripts &&\
|
||||||
RUN npm ci --ignore-scripts
|
npx prisma generate &&\
|
||||||
|
|
||||||
# Copy backend source after dependencies are installed
|
|
||||||
COPY --chown=node:node backend/ /app/backend/
|
|
||||||
|
|
||||||
# Generate Prisma client and clean up
|
|
||||||
RUN npx prisma generate &&\
|
|
||||||
npm prune --omit=dev &&\
|
npm prune --omit=dev &&\
|
||||||
npm cache clean --force
|
npm cache clean --force
|
||||||
|
|
||||||
@@ -35,6 +29,7 @@ USER node
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=builder /app/backend /app/backend
|
COPY --from=builder /app/backend /app/backend
|
||||||
|
COPY --from=builder /app/node_modules /app/node_modules
|
||||||
COPY --chown=node:node agents ./agents_backup
|
COPY --chown=node:node agents ./agents_backup
|
||||||
COPY --chown=node:node agents ./agents
|
COPY --chown=node:node agents ./agents
|
||||||
COPY --chmod=755 docker/backend.docker-entrypoint.sh ./entrypoint.sh
|
COPY --chmod=755 docker/backend.docker-entrypoint.sh ./entrypoint.sh
|
||||||
|
|||||||
@@ -2,19 +2,14 @@ FROM node:lts-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy frontend package files
|
COPY package*.json ./
|
||||||
COPY frontend/package*.json ./frontend/
|
COPY frontend/package*.json ./frontend/
|
||||||
|
|
||||||
WORKDIR /app/frontend
|
|
||||||
|
|
||||||
# Install frontend dependencies (now has its own package-lock.json)
|
|
||||||
RUN npm ci --ignore-scripts
|
RUN npm ci --ignore-scripts
|
||||||
|
|
||||||
# Copy frontend source after dependencies are installed
|
COPY frontend/ ./frontend/
|
||||||
COPY frontend/ ./
|
|
||||||
|
|
||||||
# Build the frontend
|
RUN npm run build:frontend
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM nginxinc/nginx-unprivileged:alpine
|
FROM nginxinc/nginx-unprivileged:alpine
|
||||||
|
|
||||||
|
|||||||
4461
frontend/package-lock.json
generated
4461
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
1805
package-lock.json
generated
1805
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user