File tree 3 files changed +22
-5
lines changed
3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,32 @@ RUN apt-get update \
17
17
&& apt-get clean \
18
18
&& rm -rf /var/lib/apt/lists/*
19
19
20
+ # Install uv
21
+ # Download the latest installer
22
+ ADD https://astral.sh/uv/0.6.0/install.sh /uv-installer.sh
23
+
24
+ RUN echo "5464b06094b6363861b99cd60a010892e52fc2a7503b7594419828e74afecfe6 /uv-installer.sh" | sha256sum -c
25
+
26
+ # Run the installer then remove it
27
+ RUN sh /uv-installer.sh && rm /uv-installer.sh
28
+
29
+ # Ensure the installed binary is on the `PATH`
30
+ ENV PATH="/root/.local/bin/:$PATH"
31
+
32
+ # RUN curl -LsSf https://astral.sh/uv/0.4.30/install.sh | sh
33
+
20
34
# Copy config files
21
35
COPY docker/shibboleth/ /etc/shibboleth/
22
36
COPY docker/nginx-default.conf /etc/nginx/conf.d/default.conf
23
37
COPY docker/shib_clear_headers /etc/nginx/
24
38
COPY docker/supervisord.conf /etc/supervisor/
25
39
26
40
# Copy project dependencies
27
- COPY Pipfile* /app/
41
+ COPY pyproject.toml /app/
42
+ COPY uv.lock /app/
28
43
29
44
# Install project dependencies
30
- RUN pipenv install --deploy --system
45
+ RUN cd /app/ && uv sync
31
46
32
47
# Copy project files
33
48
COPY . /app/
@@ -38,7 +53,7 @@ ENV IDENTITY_RSA_PRIVATE_KEY 'temporary private key just to build the docker ima
38
53
ENV OIDC_RSA_PRIVATE_KEY 'temporary private key just to build the docker image'
39
54
40
55
# Collect static files
41
- RUN python3 /app/manage.py collectstatic --noinput
56
+ RUN uv run /app/manage.py collectstatic --noinput
42
57
43
58
# Copy mime definitions
44
59
COPY docker/mime.types /etc/mime.types
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ cd /app/ &&
4
+
3
5
# Django Migrate
4
- /usr/ bin/python3 /app/ manage.py migrate --noinput
6
+ /root/.local/ bin/uv run manage.py migrate --noinput ||
5
7
6
8
# Run supervisor
7
9
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ stdout_logfile_maxbytes=0
40
40
autorestart=true
41
41
42
42
[program:platform]
43
- command=/usr/local /bin/uwsgi --ini /app/setup.cfg
43
+ command=/app/.venv /bin/uwsgi --ini /app/setup.cfg
44
44
stdout_logfile=/dev/stdout
45
45
redirect_stderr=true
46
46
stdout_logfile_maxbytes=0
You can’t perform that action at this time.
0 commit comments