-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (23 loc) · 858 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (23 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# build tailwind
FROM node:lts-alpine AS node_builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build:tailwind
# build python stuff
FROM python:3.10-slim-buster AS python_builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# final
FROM python:3.10-slim-buster
WORKDIR /app
COPY --from=python_builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY --from=python_builder /usr/local/bin /usr/local/bin
COPY --from=node_builder /app/static/css/output.css ./static/css/output.css
COPY . .
COPY config/config.example.json config/config.json
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["sh", "-c", "echo \"{\\\"host\\\": \\\"$APP_HOST\\\", \\\"port\\\": $APP_PORT}\" > /app/config/config.json && exec \"$@\"", "--"]
CMD ["python", "src/app.py"]