2025-11-18 21:39:01 +00:00
|
|
|
FROM node:22-alpine AS node
|
2025-11-10 16:40:21 +00:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2025-11-10 16:46:12 +00:00
|
|
|
LABEL org.opencontainers.image.source="TBC"
|
|
|
|
|
LABEL org.opencontainers.image.description="FYP Image"
|
|
|
|
|
|
2025-11-10 16:40:21 +00:00
|
|
|
COPY package*.json ./
|
|
|
|
|
|
|
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
2025-11-18 21:39:01 +00:00
|
|
|
RUN npm run build
|
2025-11-10 16:40:21 +00:00
|
|
|
|
2025-11-18 21:39:01 +00:00
|
|
|
FROM python:3.14.0-bookworm as python
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
|
build-essential \
|
|
|
|
|
libpq-dev \
|
|
|
|
|
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip install --no-cache-dir --requirement /requirements.txt
|
2025-11-10 16:40:21 +00:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2025-11-18 21:39:01 +00:00
|
|
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
|
sudo git bash-completion nano ssh
|
|
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
COPY --from=node /app/build ./build
|
2025-11-10 16:40:21 +00:00
|
|
|
|
2025-11-18 21:39:01 +00:00
|
|
|
COPY ./compose/prod/start /start
|
|
|
|
|
RUN sed -i 's/\r$//g' /start
|
|
|
|
|
RUN chmod +x /start
|
2025-11-10 16:40:21 +00:00
|
|
|
|
2025-11-18 21:39:01 +00:00
|
|
|
ENTRYPOINT ["/start"]
|