ar08 commited on
Commit
49f969b
·
verified ·
1 Parent(s): f0eab43

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -68
Dockerfile CHANGED
@@ -1,71 +1,8 @@
1
- # Clone Saleor Repository
2
- FROM alpine/git as clone-stage
3
- WORKDIR /tmp
4
- RUN git clone https://github.com/saleor/saleor.git
5
-
6
- # Build and install packages
7
- FROM python:3.12 AS build-python
8
-
9
- RUN apt-get -y update \
10
- && apt-get install -y gettext \
11
- && apt-get clean \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- # Install Python dependencies
15
- WORKDIR /app
16
- RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install poetry==1.8.4
17
- RUN poetry config virtualenvs.create false
18
-
19
- COPY --from=clone-stage /tmp/saleor/poetry.lock /tmp/saleor/pyproject.toml /app/
20
- RUN --mount=type=cache,mode=0755,target=/root/.cache/pypoetry poetry install --no-root
21
-
22
- # Final image
23
- FROM python:3.12-slim
24
-
25
- RUN groupadd -r saleor && useradd -r -g saleor saleor
26
-
27
- # Pillow dependencies
28
- RUN apt-get update \
29
- && apt-get install -y \
30
- libffi8 \
31
- libgdk-pixbuf2.0-0 \
32
- liblcms2-2 \
33
- libopenjp2-7 \
34
- libssl3 \
35
- libtiff6 \
36
- libwebp7 \
37
- libpq5 \
38
- shared-mime-info \
39
- mime-support \
40
- && apt-get clean \
41
- && rm -rf /var/lib/apt/lists/*
42
-
43
- RUN mkdir -p /app/media /app/static \
44
- && chown -R saleor:saleor /app/
45
-
46
- COPY --from=build-python /usr/local/lib/python3.12/site-packages/ /usr/local/lib/python3.12/site-packages/
47
- COPY --from=build-python /usr/local/bin/ /usr/local/bin/
48
- COPY --from=clone-stage /tmp/saleor /app
49
 
 
50
  WORKDIR /app
51
 
52
- ARG STATIC_URL
53
- ENV STATIC_URL=${STATIC_URL:-/static/}
54
- RUN SECRET_KEY=dummy STATIC_URL=${STATIC_URL} python3 manage.py collectstatic --no-input
55
-
56
- EXPOSE 8000
57
- ENV PYTHONUNBUFFERED=1
58
-
59
- LABEL org.opencontainers.image.title="saleor/saleor" \
60
- org.opencontainers.image.description="\
61
- A modular, high performance, headless e-commerce platform built with Python, \
62
- GraphQL, Django, and ReactJS." \
63
- org.opencontainers.image.url="https://saleor.io/" \
64
- org.opencontainers.image.source="https://github.com/saleor/saleor" \
65
- org.opencontainers.image.authors="Saleor Commerce (https://saleor.io)" \
66
- org.opencontainers.image.licenses="BSD 3"
67
-
68
-
69
-
70
-
71
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "4", "--worker-class", "saleor.asgi.gunicorn_worker.UvicornWorker", "saleor.asgi:application"]
 
1
+ # Use dokploy/dokploy:latest as the base image
2
+ FROM dokploy/dokploy:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Default command
8
+ CMD ["dorkploy"]