Skip to content

Commit be116d6

Browse files
committed
Almost got deploy working
1 parent 39b4bd8 commit be116d6

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

Diff for: backend/Dockerfile

+18-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,32 @@ RUN apt-get update \
1717
&& apt-get clean \
1818
&& rm -rf /var/lib/apt/lists/*
1919

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+
2034
# Copy config files
2135
COPY docker/shibboleth/ /etc/shibboleth/
2236
COPY docker/nginx-default.conf /etc/nginx/conf.d/default.conf
2337
COPY docker/shib_clear_headers /etc/nginx/
2438
COPY docker/supervisord.conf /etc/supervisor/
2539

2640
# Copy project dependencies
27-
COPY Pipfile* /app/
41+
COPY pyproject.toml /app/
42+
COPY uv.lock /app/
2843

2944
# Install project dependencies
30-
RUN pipenv install --deploy --system
45+
RUN cd /app/ && uv sync
3146

3247
# Copy project files
3348
COPY . /app/
@@ -38,7 +53,7 @@ ENV IDENTITY_RSA_PRIVATE_KEY 'temporary private key just to build the docker ima
3853
ENV OIDC_RSA_PRIVATE_KEY 'temporary private key just to build the docker image'
3954

4055
# Collect static files
41-
RUN python3 /app/manage.py collectstatic --noinput
56+
RUN uv run /app/manage.py collectstatic --noinput
4257

4358
# Copy mime definitions
4459
COPY docker/mime.types /etc/mime.types

Diff for: backend/docker/platform-run

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/bash
22

3+
cd /app/ &&
4+
35
# Django Migrate
4-
/usr/bin/python3 /app/manage.py migrate --noinput
6+
/root/.local/bin/uv run manage.py migrate --noinput ||
57

68
# Run supervisor
79
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf

Diff for: backend/docker/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ stdout_logfile_maxbytes=0
4040
autorestart=true
4141

4242
[program:platform]
43-
command=/usr/local/bin/uwsgi --ini /app/setup.cfg
43+
command=/app/.venv/bin/uwsgi --ini /app/setup.cfg
4444
stdout_logfile=/dev/stdout
4545
redirect_stderr=true
4646
stdout_logfile_maxbytes=0

0 commit comments

Comments
 (0)