Author SHA1 Message Date
marc 8e77d7c64e dont ignore my pipfiles
Docker / build (push) Canceled after 0s
Pylint / build (push) Canceled after 0s
2022-08-20 01:06:17 +02:00
marc 550419381a back to root 2022-08-20 01:04:06 +02:00
marc fc9f4cde3b opt website 2022-08-20 01:03:13 +02:00
marc 3f2b863f5a workdir app 2022-08-20 01:02:05 +02:00
marc 8231096b4d npm 2022-08-20 01:00:39 +02:00
marc 87268abcc3 latest python 2022-08-20 00:57:49 +02:00
marc c67e613ba2 local docker cache 2022-08-20 00:48:45 +02:00
marc 76985fa799 Merge branch 'master' into arch 2022-08-20 00:46:15 +02:00
marc dae43435e4 arch 2022-08-20 00:33:11 +02:00
marc ba7998c636 paru 2022-08-20 00:28:34 +02:00
marc 0ac6f00ef0 arch 2022-08-20 00:26:13 +02:00
marc 2bdc141e2d archlinux first try 2022-08-20 00:11:14 +02:00
2757 changed files with 2112 additions and 269906 deletions
-1
View File
@@ -18,4 +18,3 @@ venv
.travis.yml
.gitignore
.dockerignore
requirements.txt
+6
View File
@@ -38,4 +38,10 @@ 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
+17 -41
View File
@@ -1,68 +1,44 @@
FROM python:3.7.12 as builder
# Pre installations
RUN apt update
RUN apt install -y curl npm
RUN pip install poetry
# Copy useful files
FROM marcpartensky/paru:latest as builder
RUN paru -Syyyu --noconfirm python-pipenv npm make
USER root
COPY . /opt/website
WORKDIR /opt/website
COPY pyproject.toml poetry.lock package.json package-lock.json ./
# Run updates
RUN poetry update
RUN poetry export -f requirements.txt --without-hashes --output requirements.txt
RUN npm update
RUN pipenv update
RUN pipenv run ./manage.py collectstatic --noinput
RUN npm install -g npm@latest
RUN npm install
# Image of production
FROM python:3.7.12-alpine
ENV SECRET_KEY=whatever
FROM marcpartensky/paru:latest
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
# Labels
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"
# Install curl and stuff for pillow
RUN apk add --update --virtual .tmp libffi-dev build-base linux-headers
RUN apk add curl jpeg-dev zlib-dev
# Copy useful files
WORKDIR /opt/website
COPY website /opt/website/website
COPY --from=builder /opt/website/requirements.txt ./
COPY LICENSE ./
COPY --from=builder /app /app
WORKDIR /app
# No .pyo and easier debugging
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install dependencies
RUN pip install -U pip
RUN pip install -r requirements.txt
RUN ./website/manage.py makemigrations
RUN ./website/manage.py collectstatic --noinput
RUN apk del .tmp
# Setup env vars for entrypoint.sh
ENV PORT 80
ENV HOST 0.0.0.0
EXPOSE 80
# EXPOSE 443
# Check health
HEALTHCHECK --interval=30s \
--timeout=10s \
--start-period=1m \
--retries=3 \
CMD curl -sSf http://127.0.0.1:$PORT/live || exit 1
WORKDIR /opt/website/website
ENTRYPOINT ["./entrypoint.sh"]
ENTRYPOINT ["/app/entrypoint.sh"]
# ENTRYPOINT ["daphne", "-e", "ssl:443:privateKey=$KEY:certKey=$CERT", "django_project.asgi:application"]
+6 -4
View File
@@ -5,7 +5,7 @@ PRODUCTION=false
.PHONY: start list build push setup update init test up down migrate brewstart brewstop dev prod clean deploy
start:
poetry run ./entrypoint.sh --nosetup
pipenv run ./entrypoint.sh --nosetup
list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
build: update
@@ -17,9 +17,11 @@ setup: init update start
update:
npm update
npm audit fix || echo npm audit fix failed
poetry export -o requirements.txt
SECRET_KEY=secret poetry run ./website/manage.py collectstatic --noinput
SECRET_KEY=secret poetry run ./website/manage.py makemigrations
# pipenv lock --pre --clear
pipenv update
pipenv lock -r > requirements.txt
SECRET_KEY=secret pipenv run ./manage.py collectstatic --noinput
SECRET_KEY=secret pipenv run ./manage.py makemigrations
init: .env
pip install --user pipenv
pipenv install --dev
+154 -75
View File
@@ -4,82 +4,161 @@ verify_ssl = true
name = "pypi"
[packages]
ansicon = "==1.89.0"
arrow = "==1.2.2"
asgiref = "==3.5.2"
attrs = "==21.4.0"
autobahn = "==22.4.2"
blessed = "==1.19.1"
certifi = "==2022.5.18.1"
cffi = "==1.15.0"
channels = "==3.0.4"
charset-normalizer = "==2.0.12"
commonmark = "==0.9.1"
constantly = "==15.1.0"
cryptography = "==37.0.2"
daphne = "==3.0.2"
defusedxml = "==0.7.1"
dj-database-url = "==0.5.0"
django-allauth = "==0.50.0"
django-appconf = "==1.0.5"
django-compressor = "==4.0"
django-crispy-forms = "==1.14.0"
django-extensions = "==3.1.5"
django-ftpserver = "==0.8.0"
django-heroku = "==0.3.1"
django-jsonfield-backport = "==1.0.5"
django-markdown-view = "==0.0.5"
django-mdeditor = "==0.1.20"
django-picklefield = "==3.0.1"
django-q = "==1.3.9"
django-robots = "==5.0"
django-shortuuidfield = "==0.1.3"
django-sql-explorer = "==2.4.1"
django-storages = "==1.12.3"
djangorestframework = "==3.13.1"
hyperlink = "==21.0.0"
idna = "==3.3"
incremental = "==21.3.0"
jinxed = "==1.2.0"
oauthlib = "==3.2.0"
psycopg2 = "==2.9.3"
pyasn1-modules = "==0.2.8"
pyasn1 = "==0.4.8"
pycparser = "==2.21"
pyftpdlib = "==1.5.6"
python-dateutil = "==2.8.2"
python-dotenv = "==0.20.0"
python3-openid = "==3.2.0"
pytz = "==2022.1"
rcssmin = "==1.1.0"
redis = "==3.5.3"
requests-oauthlib = "==1.3.1"
requests = "==2.27.1"
rich = "==12.4.4"
rjsmin = "==1.2.0"
service-identity = "==21.1.0"
shortuuid = "==1.0.9"
six = "==1.16.0"
sqlparse = "==0.4.2"
twisted-iocpsupport = "==1.0.2"
txaio = "==22.2.1"
typing-extensions = "==4.2.0"
tzdata = "==2022.1"
urllib3 = "==1.26.9"
wcwidth = "==0.2.5"
whitenoise = "==6.1.0"
"zope.interface" = "==5.4.0"
Automat = "==20.2.0"
Django = "==4.0.4"
Markdown = "==3.3.7"
Pillow = "==9.1.1"
Pygments = "==2.12.0"
PyJWT = "==2.4.0"
pyOpenSSL = "==22.0.0"
PyYAML = "==6.0"
Twisted = "==22.4.0"
aioredis = "*"
appdirs = "*"
appnope = "*"
arrow = "*"
asgiref = "*"
astroid = "*"
async-timeout = "*"
attrs = "*"
autobahn = "*"
backcall = "*"
blessed = "*"
boto3 = "*"
botocore = "*"
certifi = "*"
cffi = "*"
channels = "*"
channels-redis = "*"
chardet = "*"
click = "*"
colorama = "*"
commonmark = "*"
constantly = "*"
coverage = "*"
cryptography = "*"
daphne = "*"
decorator = "*"
defusedxml = "*"
dj-database-url = "*"
django-503 = "*"
django-admin = "*"
django-allauth = "*"
django-appconf = "*"
django-avatar = "*"
django-compressor = "*"
django-cors-middleware = "*"
django-crispy-forms = "*"
django-excel-base = "*"
django-excel-response2 = "*"
django-extensions = "*"
django-ftpserver = "*"
django-heroku = "*"
django-jsonfield-backport = "*"
django-libsass = "*"
django-markdown-view = "*"
django-mdeditor = "*"
django-picklefield = "*"
django-q = "*"
django-rename-app = "*"
django-shortuuidfield = "*"
django-six = "*"
django-sql-explorer = "*"
django-storages = "*"
djangorestframework = "*"
docopt = "*"
docutils = "*"
flake8 = "*"
future = "*"
graphviz = "*"
gunicorn = "*"
h2 = "*"
hiredis = "*"
hpack = "*"
hyperframe = "*"
hyperlink = "*"
idna = "*"
importlib-metadata = "*"
incremental = "*"
ipython = "*"
isort = "*"
jedi = "*"
jeepney = "*"
jmespath = "*"
keyring = "*"
"keyrings.alt" = "==3.2.0"
lazy-object-proxy = "*"
libsass = "*"
mccabe = "*"
mock = "*"
msgpack = "*"
msgpack-python = "*"
mypy-extensions = "*"
nose = "*"
oauthlib = "*"
parso = "*"
pathspec = "*"
pexpect = "*"
pickleshare = "*"
pip-autoremove = "*"
pip-conflict-checker = "*"
pip-review = "*"
pipdeptree = "*"
pipupgrade = "*"
priority = "*"
prompt-toolkit = "*"
psycopg2-binary = "*"
ptyprocess = "*"
pyasn1 = "*"
pyasn1-modules = "*"
pycodestyle = "*"
pycparser = "*"
pyflakes = "*"
pyftpdlib = "*"
pylint = "*"
pyparsing = "*"
python-dateutil = "*"
python-dotenv = "*"
python3-openid = "*"
pytz = "*"
rcssmin = "*"
redis = "*"
regex = "*"
requests = "*"
requests-oauthlib = "*"
rich = "*"
rjsmin = "*"
s3transfer = "*"
screen = "*"
shortuuid = "*"
six = "*"
sqlparse = "*"
toml = "*"
traitlets = "*"
txaio = "*"
typed-ast = "*"
typing-extensions = "*"
tzlocal = "*"
urllib3 = "*"
wcwidth = "*"
whitenoise = "*"
wrapt = "*"
xlwt = "*"
yarg = "*"
zipp = "*"
"zope.interface" = "*"
Automat = "*"
Django = "*"
ipython_genutils = "*"
Markdown = "*"
Pillow = "*"
Pygments = "*"
PyHamcrest = "*"
PyJWT = "*"
pyOpenSSL = "*"
PyYAML = "*"
SecretStorage = "*"
service_identity = "*"
Twisted = "*"
django-robots = "*"
selenium = "*"
geckodriver-autoinstaller = "*"
[dev-packages]
black = "*"
jedi = "*"
pylint = "*"
[requires]
python_version = "3.10"
python_version = "3.7.12"
Generated
+1698 -245
View File
File diff suppressed because it is too large Load Diff
View File
View File
View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Some files were not shown because too many files have changed in this diff Show More