Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e77d7c64e | ||
|
|
550419381a | ||
|
|
fc9f4cde3b | ||
|
|
3f2b863f5a | ||
|
|
8231096b4d | ||
|
|
87268abcc3 | ||
|
|
c67e613ba2 | ||
|
|
76985fa799 | ||
|
|
368a74a1c7 | ||
|
|
dae43435e4 | ||
|
|
ba7998c636 | ||
|
|
0ac6f00ef0 | ||
|
|
2bdc141e2d | ||
|
|
c1ba069b41 | ||
|
|
0271e71974 | ||
|
|
d209ad28c5 | ||
|
|
9f5de228b5 | ||
|
|
92871ae135 |
@@ -15,8 +15,6 @@ venv
|
||||
.buildpacks
|
||||
*.pem
|
||||
*.crt
|
||||
Pipfile
|
||||
Pipfile.lock
|
||||
.travis.yml
|
||||
.gitignore
|
||||
.dockerignore
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: website
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
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
|
||||
@@ -19,8 +19,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update apt
|
||||
run: sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
|
||||
- name: Install make
|
||||
run: sudo apt install make -y
|
||||
- name: Install Python3.7
|
||||
@@ -36,13 +34,23 @@ jobs:
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Build and push
|
||||
id: build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: false
|
||||
tags: marcpartensky/website:latest
|
||||
- name: Compose up
|
||||
run: docker-compose -f dev.yml up -d website postgres mysql
|
||||
- name: Test
|
||||
run: docker-compose run test
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
id: push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
FROM python:3.7.12
|
||||
# ARG timestamp
|
||||
# ARG commit
|
||||
FROM marcpartensky/paru:latest as builder
|
||||
RUN paru -Syyyu --noconfirm python-pipenv npm make
|
||||
USER root
|
||||
COPY . /opt/website
|
||||
WORKDIR /opt/website
|
||||
RUN pipenv update
|
||||
RUN pipenv run ./manage.py collectstatic --noinput
|
||||
RUN npm install -g npm@latest
|
||||
RUN npm install
|
||||
|
||||
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
|
||||
|
||||
COPY . /app
|
||||
COPY --from=builder /app /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm install -g npm@latest
|
||||
RUN npm install
|
||||
|
||||
# No .pyo and easier debugging
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
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 |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |