mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
First commit with next js.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
FROM python:3.12-bookworm
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
COPY requirements/requirements.txt /tmp/requirements.txt
|
||||
COPY requirements/requirements.dev.txt /tmp/requirements.dev.txt
|
||||
|
||||
WORKDIR /src
|
||||
ARG DEV=false
|
||||
RUN apt-get install openssh-client -y
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y postgresql postgresql-client binutils libproj-dev gdal-bin
|
||||
|
||||
RUN pip install -r /tmp/requirements.txt
|
||||
RUN pip install -r /tmp/requirements.dev.txt
|
||||
|
||||
COPY . /src
|
||||
|
||||
ENV PATH="/scripts:/py/bin:$PATH"
|
||||
|
||||
CMD ["gunicorn", "main:app", "--bind", "0.0.0.0:80","--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker"]
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM node:lts-alpine3.19
|
||||
|
||||
ENV NODE_OPTIONS="--max-old-space-size=8192"
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json .
|
||||
|
||||
RUN npm install -f
|
||||
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Stage 1: Build the frontend
|
||||
FROM node:18 AS frontend-build
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm install
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Build the backend
|
||||
FROM python:3.11-slim AS backend-build
|
||||
WORKDIR /app/backend
|
||||
COPY backend/requirements/requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY backend/ ./
|
||||
RUN apt-get -y update
|
||||
RUN apt-get -y install curl
|
||||
|
||||
# Copy the built frontend to the backend's static directory
|
||||
COPY --from=frontend-build /app/frontend/dist /app/backend/static
|
||||
|
||||
# Expose the backend port (e.g., 80 for FastAPI)
|
||||
EXPOSE 80
|
||||
|
||||
# Set the environment to production
|
||||
ENV ENV=production
|
||||
|
||||
# Set the command to run the backend server
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|
||||
#CMD ["gunicorn", "main:app", "--bind", "0.0.0.0:80","--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker"]
|
||||
Reference in New Issue
Block a user