worknig
This commit is contained in:
parent
6828c5684c
commit
afdffffc3c
@ -14,4 +14,5 @@ COPY ./main.py ./list.tpl ./
|
|||||||
|
|
||||||
# I juste wanted to change the socket owner but it turned out I needed to change thu uwsgi user
|
# I juste wanted to change the socket owner but it turned out I needed to change thu uwsgi user
|
||||||
#CMD uwsgi --exec-asap 'chown $UID:$UID /tmp/uwsgi/ ; mkdir -p $BASE_PATH && chown $UID:$UID $BASE_PATH' -s /tmp/uwsgi/uwsgi.sock --uid $UID --manage-script-name --mount /=server:app
|
#CMD uwsgi --exec-asap 'chown $UID:$UID /tmp/uwsgi/ ; mkdir -p $BASE_PATH && chown $UID:$UID $BASE_PATH' -s /tmp/uwsgi/uwsgi.sock --uid $UID --manage-script-name --mount /=server:app
|
||||||
CMD uwsgi --chown-socket $UID -s /tmp/uwsgi/uwsgi.sock --mount $MOUNT=main:app
|
# --log-master makes 500 error on 30s timeout for every valid http request
|
||||||
|
CMD uwsgi --chown-socket $UID -s /tmp/uwsgi/uwsgi.sock --manage-script-name --mount $MOUNT=main:app
|
||||||
|
5
build_docker.sh
Executable file
5
build_docker.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
set -e
|
||||||
|
version=2.0.1
|
||||||
|
docker build -t registry.jean-cloud.net/contact-mailer:latest -t registry.jean-cloud.net/contact-mailer:$version .
|
||||||
|
docker push registry.jean-cloud.net/contact-mailer:latest
|
||||||
|
docker push registry.jean-cloud.net/contact-mailer:$version
|
3
main.py
3
main.py
@ -132,7 +132,8 @@ def submission ():
|
|||||||
|
|
||||||
# Redirection
|
# Redirection
|
||||||
#redirect(success_redirect_default)
|
#redirect(success_redirect_default)
|
||||||
return 'Mail envoyé !'
|
origin = request.headers.get('origin')
|
||||||
|
return 'Mail envoyé !' + ('Retour au <a href="{}">formulaire de contact</a>'.format(origin) if origin else '')
|
||||||
|
|
||||||
def get_fields (string):
|
def get_fields (string):
|
||||||
""" Parse the string looking for template elements and create an array with template to fill and their default values. None if mandatory. """
|
""" Parse the string looking for template elements and create an array with template to fill and their default values. None if mandatory. """
|
||||||
|
Loading…
Reference in New Issue
Block a user