generated from albertyw/base-flask
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (30 loc) · 1014 Bytes
/
Dockerfile
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
FROM node:23-slim AS node
WORKDIR /root
COPY . /root
RUN npm ci --only=production \
&& npm run build:prod
FROM python:3.13-slim-bookworm
LABEL maintainer="[email protected]"
EXPOSE 5000
HEALTHCHECK --interval=5s --timeout=3s CMD bin/healthcheck.sh || exit 1
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set locale
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl locales `: Basic-packages` \
supervisor `: Runnning python in daemon mode` \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
# Set up directory structures
WORKDIR /var/www/app
RUN mkdir -p .
COPY . .
COPY --from=node /root/static/gen ./static/gen
# Set up dependencies
RUN pip install --no-cache-dir -e .
# Set startup script
CMD ["bin/start.sh"]