mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-08-21 14:37:16 +00:00
Improve CI
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -41,6 +41,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
|
cache-from: type=registry,ref=ultradesu/outfleet:buildcache
|
||||||
|
cache-to: type=registry,ref=ultradesu/outfleet:buildcache,mode=max
|
||||||
build-args: |
|
build-args: |
|
||||||
GIT_COMMIT=${{ steps.vars.outputs.sha_full }}
|
GIT_COMMIT=${{ steps.vars.outputs.sha_full }}
|
||||||
GIT_COMMIT_SHORT=${{ steps.vars.outputs.sha_short }}
|
GIT_COMMIT_SHORT=${{ steps.vars.outputs.sha_short }}
|
||||||
|
10
Dockerfile
10
Dockerfile
@@ -14,9 +14,17 @@ ENV BRANCH_NAME=${BRANCH_NAME}
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system dependencies first (this layer will be cached)
|
||||||
|
RUN apk update && apk add git
|
||||||
|
|
||||||
|
# Copy and install Python dependencies (this layer will be cached when requirements.txt doesn't change)
|
||||||
COPY ./requirements.txt .
|
COPY ./requirements.txt .
|
||||||
RUN apk update && apk add git && pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy the rest of the application code (this layer will change frequently)
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Run collectstatic
|
||||||
RUN python manage.py collectstatic --noinput
|
RUN python manage.py collectstatic --noinput
|
||||||
|
|
||||||
CMD [ "python", "./manage.py", "runserver", "0.0.0.0:8000" ]
|
CMD [ "python", "./manage.py", "runserver", "0.0.0.0:8000" ]
|
||||||
|
Reference in New Issue
Block a user