Backend LGTM
This commit is contained in:
parent
9a7ce60913
commit
2395bc215d
@ -1,6 +1,7 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
RUN apk --no-cache add python3 inkscape bash imagemagick ttf-opensans
|
RUN apk --no-cache add python3 inkscape bash imagemagick ttf-opensans
|
||||||
|
RUN apk --no-cache add py3-pip && pip3 install django tzdata
|
||||||
|
|
||||||
ADD backend /root/zetikettes
|
ADD backend /root/zetikettes
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ RUN mkdir -p /usr/share/fonts/TTF \
|
|||||||
&& cp /root/zetikettes/fonts/*.ttf /usr/share/fonts/TTF/ \
|
&& cp /root/zetikettes/fonts/*.ttf /usr/share/fonts/TTF/ \
|
||||||
&& fc-cache -fv
|
&& fc-cache -fv
|
||||||
|
|
||||||
|
|
||||||
# the script will look for templates in /data
|
# the script will look for templates in /data
|
||||||
WORKDIR /root/zetikettes
|
WORKDIR /root/zetikettes
|
||||||
CMD /usr/bin/python3 web.py
|
CMD /usr/bin/python3 zetikettes/manage.py runserver 0.0.0.0:8000
|
||||||
|
@ -21,7 +21,7 @@ Test
|
|||||||
----
|
----
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run --rm -it -v $PWD/templates:/data zetikettes /bin/bash /root/zetikettes/mkjam.sh
|
docker run --rm -it -v $PWD/templates:/data zetikettes /bin/bash /root/zetikettes/old/mkjam.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
This should produce a .pdf in `templates/`. Open it to check that
|
This should produce a .pdf in `templates/`. Open it to check that
|
||||||
@ -37,7 +37,7 @@ docker run -d --rm -p 127.0.0.1:8000:8000 -v /var/lib/zetikettes/templates:/data
|
|||||||
Change available templates
|
Change available templates
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
1. go to /zetikettes/newtikette.html or konami code from main app
|
1. go to /zetikettes/admin
|
||||||
1. add the newtikette
|
1. add the newtikette
|
||||||
1. still no need to restart the container (magic!)
|
1. still no need to restart the container (magic!)
|
||||||
2. profit.
|
2. profit.
|
||||||
|
@ -81,7 +81,7 @@ WSGI_APPLICATION = 'zetikettes.wsgi.application'
|
|||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
'NAME': TIKETTE_OUT_DIR / 'db.sqlite3',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user