-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathDockerfile
23 lines (20 loc) · 934 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
# Copyright (c) 2022 SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
FROM node:lts-alpine AS node
COPY app/web-client /web-client
WORKDIR /web-client
RUN yarn install && yarn cache clean && yarn build
FROM python:3.12-slim
LABEL org.opencontainers.vendor="SIGHUP.io"
LABEL org.opencontainers.image.authors="SIGHUP https://sighup.io"
LABEL org.opencontainers.image.source="https://github.com/sighupio/gatekeeper-policy-manager"
RUN groupadd -r gpm && useradd --no-log-init -r -g gpm gpm
WORKDIR /app
COPY --chown=gpm ./app /app
COPY --from=node --chown=gpm /web-client/build/ /app/static-content/
# hadolint ignore=DL3013
RUN pip install --no-cache-dir uv && uv pip install --system --no-cache-dir -r /app/requirements.txt
USER 999
EXPOSE 8080
CMD ["gunicorn", "--bind=:8080", "--workers=2", "--threads=4", "--worker-class=gthread", "app:app"]