forked from RedHatInsights/insights-host-inventory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.dockerfile
More file actions
44 lines (38 loc) · 1.25 KB
/
Copy pathdev.dockerfile
File metadata and controls
44 lines (38 loc) · 1.25 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
37
38
39
40
41
42
43
44
FROM registry.access.redhat.com/ubi9/python-312
ENV APP_ROOT=/opt/app-root/src
WORKDIR $APP_ROOT
USER 0
# use general package name instead of a specific one,
# like "postgresql-10.15-1.module+el8.3.0+8944+1ca16b1f.x86_64",
# so future security fixes are autamatically picked up.
RUN dnf install -y postgresql && \
dnf clean all
COPY api/ api/
COPY app/ app/
COPY lib/ lib/
COPY migrations/ migrations/
COPY swagger/ swagger/
COPY tests/ tests/
COPY utils/ utils/
COPY jobs/ jobs/
COPY Makefile Makefile
COPY gunicorn.conf.py gunicorn.conf.py
COPY wait_for_migrations.py wait_for_migrations.py
COPY inv_mq_service.py inv_mq_service.py
COPY inv_export_service.py inv_export_service.py
COPY logconfig.yaml logconfig.yaml
COPY manage.py manage.py
COPY pyproject.toml pyproject.toml
COPY uv.lock uv.lock
COPY uv-build-version uv-build-version
COPY scripts/get_uv_pip_specifier.py scripts/get_uv_pip_specifier.py
COPY pytest.ini pytest.ini
COPY run_gunicorn.py run_gunicorn.py
COPY run_command.sh run_command.sh
COPY run.py run.py
RUN chown -R 1001:0 ./
USER 1001
ENV PATH="$APP_ROOT/.venv/bin:$PATH"
RUN UV_SPEC=$(python3 scripts/get_uv_pip_specifier.py --build-pin) && pip install "uv${UV_SPEC}" && \
uv sync --frozen
CMD bash -c 'make upgrade_db && make run_inv_mq_service'