-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (20 loc) · 736 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (20 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.12-alpine AS build
# Install required build tools
RUN apk add --no-cache build-base python3-dev meson cython libstdc++
WORKDIR /app
COPY pymatcher-src .
RUN pip wheel . -w /app/wheels
FROM python:3.12-alpine
RUN apk add --no-cache libstdc++
RUN echo "#!/bin/sh" > /start_celery_worker
#RUN echo "python -m celery -A scm_site worker -l info" >> /start_celery_worker
RUN echo "python manage.py start_celery_worker" >> /start_celery_worker
RUN chmod +x /start_celery_worker
WORKDIR /app
COPY --from=build /app/wheels /app/wheels
COPY requirements.txt .
RUN pip install -r requirements.txt --no-cache-dir
RUN pip install /app/wheels/*.whl
COPY scm_site ./
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]