Author SHA1 Message Date
marc 915143a3fc forgot to uncomment pipfile from dockerignore
Docker / build (push) Canceled after 0s
Pylint / build (push) Canceled after 0s
2022-08-20 01:17:12 +02:00
marc c90df1c762 ignoring requirements.txt 2022-08-20 01:15:56 +02:00
marc d21e2fadf5 multistage 2022-08-20 01:14:37 +02:00
3 changed files with 16 additions and 18 deletions
+1
View File
@@ -18,3 +18,4 @@ venv
.travis.yml
.gitignore
.dockerignore
requirements.txt
-6
View File
@@ -38,10 +38,4 @@ jobs:
context: .
push: false
tags: marcpartensky/website:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
+15 -12
View File
@@ -1,27 +1,30 @@
FROM marcpartensky/paru:latest as builder
RUN paru -Syyyu --noconfirm python-pipenv npm make
USER root
COPY . /opt/website
WORKDIR /opt/website
FROM python:3.7.12-alpine as builder
COPY . /app
WORKDIR /app
RUN apk update
RUN apk add curl npm
RUN pip install pipenv
RUN pipenv update
RUN pipenv run ./manage.py collectstatic --noinput
RUN npm install -g npm@latest
RUN npm install
FROM marcpartensky/paru:latest
FROM python:3.7.12-alpine
# ARG timestamp
# ARG commit
LABEL maintainer="marc.partensky@gmail.com"
LABEL image="https://hub.docker.com/r/marcpartensky/website"
LABEL source="https://github.com/marcpartensky/website"
LABEL link="https://marcpartensky.com"
RUN paru -Syyyu --noconfirm python npm
# ARG timestamp
# ARG commit
# LABEL build.timestamp=timestamp
# LABEL build.commit=commit
COPY --from=builder /app /app
COPY --from=builder . /app
WORKDIR /app
RUN apk update
RUN apk add curl npm
# No .pyo and easier debugging
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1