Reorganize repo

This commit is contained in:
Gabriel Augendre 2021-12-19 21:41:20 +01:00
parent be29193ed2
commit ba22d5a8cb
122 changed files with 29 additions and 76 deletions

View file

@ -43,11 +43,9 @@ COPY --from=venv /app/venv /app/venv/
ENV PATH /app/venv/bin:$PATH
WORKDIR /app
COPY manage.py LICENSE pyproject.toml ./
COPY LICENSE pyproject.toml ./
COPY docker ./docker/
COPY blog ./blog/
COPY attachments ./attachments/
COPY articles ./articles/
COPY src ./src/
COPY --from=git /version /app/.version
ENV SECRET_KEY "changeme"

View file

@ -9,6 +9,5 @@ Hosted at https://gabnotes.org
## Development
```shell
inv test-cov
inv publish
inv deploy
inv build publish deploy
```

View file

@ -1,42 +0,0 @@
server {
server_name localhost:8000;
client_max_body_size 10M;
gzip on;
gzip_types
application/javascript
application/x-javascript
application/json
application/rss+xml
application/xml
application/vnd.ms-fontobject
application/font-sfnt
image/svg+xml
image/x-icon
text/xml
text/javascript
text/css
text/plain;
gzip_min_length 256;
gzip_comp_level 5;
gzip_http_version 1.1;
gzip_vary on;
location /media/ {
alias /app/media/;
expires 30d;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://django:8000;
proxy_redirect off;
}
listen [::]:80;
listen 80;
}

View file

@ -1,5 +1,4 @@
#!/bin/bash
set -eux
python manage.py migrate --noinput
python manage.py collectstatic --noinput --clear
gunicorn blog.wsgi -b 0.0.0.0:8000 --log-file -

View file

@ -1,5 +0,0 @@
#!/bin/sh
set -euxo pipefail
python -m pytest
pre-commit run --all-files
python manage.py makemigrations --check

View file

@ -1,22 +1,3 @@
[tool.black]
target-version = ['py38']
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
addopts = "--color=yes"
minversion = "6.0"
DJANGO_SETTINGS_MODULE = "blog.settings"
testpaths = [
"articles",
"blog",
"attachments",
]
env = [
"GOATCOUNTER_DOMAIN=gc.gabnotes.org"
]
[tool.poetry]
name = "blog"
version = "0.1.0"
@ -54,6 +35,23 @@ pytest-env = "^0.6.2"
poetry-deps-scanner = "^1.0.1"
invoke = "^1.6.0"
[tool.black]
target-version = ['py38']
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
addopts = "--color=yes"
minversion = "6.0"
DJANGO_SETTINGS_MODULE = "blog.settings"
testpaths = [
"src",
]
env = [
"GOATCOUNTER_DOMAIN=gc.gabnotes.org"
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

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