File size: 1,238 Bytes
1629204
 
158d234
 
1629204
4f7e650
1629204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a8f15bc
 
1629204
 
 
 
00df91d
 
 
 
1629204
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:18-bullseye AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json .
RUN npm install
COPY frontend/ .
RUN mkdir -p public
RUN npm run build

FROM python:3.10-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
    nodejs npm curl \
    && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY backend/requirements.txt ./backend/
RUN pip install --no-cache-dir -r backend/requirements.txt
COPY --from=frontend-build /app/frontend/.next ./frontend/.next
COPY --from=frontend-build /app/frontend/public ./frontend/public
COPY --from=frontend-build /app/frontend/package.json ./frontend/
COPY --from=frontend-build /app/frontend/node_modules ./frontend/node_modules
COPY --from=frontend-build /app/frontend/server.js ./frontend/
COPY --from=frontend-build /app/frontend/next.config.js ./frontend/
COPY --from=frontend-build /app/frontend/next-i18next.config.js ./frontend/
COPY --from=frontend-build /app/frontend/locales ./frontend/locales
COPY backend/ ./backend/
COPY config/ ./config/
COPY run.sh .
RUN chmod +x run.sh

# データディレクトリを作成
RUN mkdir -p /app/data/datasets /app/data/output /app/data/hf_cache /app/data/civitai_cache

ENV NODE_ENV=production
EXPOSE 7860
CMD ["./run.sh"]