-
Notifications
You must be signed in to change notification settings - Fork 253
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (21 loc) · 776 Bytes
/
Copy pathDockerfile
File metadata and controls
41 lines (21 loc) · 776 Bytes
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
35
36
37
38
39
40
FROM node:22-slim AS builder
WORKDIR /app
COPY ./frontend/package.json ./frontend/package.json
COPY ./frontend/package-lock.json ./frontend/package-lock.json
RUN cd frontend && npm install
COPY ./frontend/ ./frontend/
RUN cd frontend && npm run build
FROM python:3.12-alpine
LABEL maintainer="dairoot"
WORKDIR /app
ENV DJANGO_ENV=PRODUCTION
RUN apk add --update caddy
COPY ./backend/requirements.txt ./backend/requirements.txt
RUN cd backend && pip install -U pip && pip install -r requirements.txt
COPY ./backend/ ./backend/
COPY ./Caddyfile /app/Caddyfile
COPY --from=builder /app/frontend/dist ./frontend/dist
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 50002
CMD ["/usr/local/bin/entrypoint.sh"]