forked from scylladb/argus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (35 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
36 lines (35 loc) · 1.12 KB
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
ARG PYTHON_VERSION=3.10.4-bullseye
FROM python:${PYTHON_VERSION}
ENV ROLLUP_ENV=production
ENV FLASK_ENV=production
ENV CQLENG_ALLOW_SCHEMA_MANAGEMENT=1
ENV ARGUS_USER=argus
# Create daemon user
RUN useradd -s /bin/bash -c "Argus User" -m ${ARGUS_USER}
ENV PATH="$PATH:/home/${ARGUS_USER}/.local/bin"
# Upgrade everything
RUN apt-get update -y \
&& apt-get upgrade -y
# Install npm and python build dependencies
RUN apt-get install -y build-essential apt-utils
# Install nginx
RUN apt-get install -y nginx-full && \
chown ${ARGUS_USER}:${ARGUS_USER} -R /var/log/nginx /var/lib/nginx
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& npm i -g yarn
# Install uv
USER ${ARGUS_USER}
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Copy project files
COPY --chown=${ARGUS_USER}:${ARGUS_USER} . /app
WORKDIR /app
# Build project
RUN uv sync --extra web-backend --extra docker-image \
&& yarn \
&& ROLLUP_ENV=${ROLLUP_ENV} yarn rollup -c \
&& mkdir /app/nginx
VOLUME [ "/app/storage", "/app/config" ]
EXPOSE 8000/tcp
ENTRYPOINT [ "./docker-entrypoint.sh" ]