Skip to content

Commit 416dd1d

Browse files
committed
updates and refac
1 parent 5b6ba73 commit 416dd1d

40 files changed

Lines changed: 1561 additions & 2222 deletions

.gitignore

Lines changed: 0 additions & 102 deletions
This file was deleted.

Dockerfile

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,27 @@
1-
# Dockerfile
2-
31
# Use the official Python 3.12 image based on Alpine Linux
42
FROM python:3.12-alpine
53

64
# Set the working directory in the container
75
WORKDIR /app
86

9-
# --- Install system dependencies and global tools as root ---
10-
# 1. Update pip
7+
# --- Install system dependencies and global tools ---
118
RUN python -m pip install --upgrade pip
12-
13-
# 2. Install Node.js, npm, and live-server
149
RUN apk add --no-cache nodejs npm curl && \
1510
npm install -g live-server
1611

17-
# --- Create non-root user and group ---
18-
#RUN addgroup -S dev-group && adduser -S dev-user -G dev-group
19-
20-
# --- Install Python application dependencies (as root) ---
12+
# --- Install Python application dependencies ---
2113
COPY requirements.txt .
2214
RUN pip install --no-cache-dir -r requirements.txt
2315

24-
# --- Install Node.js application dependencies (as root) ---
25-
# Copy package files first for caching
26-
COPY package.json package-lock.json* ./
27-
# Install dependencies
16+
# --- Install Node.js application dependencies ---
17+
# CORRECTED: Copy package files from their new, correct location
18+
COPY app/node/package.json app/node/package-lock.json* ./
2819
RUN npm install --no-fund --no-audit
2920

30-
# --- Copy application code (as root) ---
31-
COPY app_flask.py .
32-
COPY app_fastapi.py .
33-
COPY app_node.js .
34-
COPY ./src /app/src
35-
3621
# --- Add healthcheck script ---
3722
COPY healthcheck.sh /usr/local/bin/
3823
RUN chmod +x /usr/local/bin/healthcheck.sh
3924

40-
# --- Change ownership of the application directory ---
41-
#RUN chown -R dev-user:dev-group /app
42-
43-
# --- Switch to the non-root user ---
44-
#USER dev-user
45-
46-
# --- Runtime configuration (runs as dev-user) ---
25+
# --- Runtime configuration ---
4726
EXPOSE 8080
4827
VOLUME /app

0 commit comments

Comments
 (0)