entrypoint_production.sh 620 Bytes
Newer Older
Thom Wiggers's avatar
Thom Wiggers committed
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

set -e

until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do
    >&2 echo "PostgreSQL is unavailable: Sleeping"
    sleep 5
done
>&2 echo "PostgreSQL is up"

Thom Wiggers's avatar
Thom Wiggers committed
11
12
chown -R 33:33 /concrexit/

Thom Wiggers's avatar
Thom Wiggers committed
13
14
15
16
cd /usr/src/app
>&2 echo "Running site with uwsgi"
uwsgi --chdir /usr/src/app \
    --socket :8000 \
Thom Wiggers's avatar
Thom Wiggers committed
17
    --socket-timeout 1800 \
Thom Wiggers's avatar
Thom Wiggers committed
18
19
20
21
    --uid 33 \
    --gid 33 \
    --threads 5 \
    --processes 5 \
Thom Wiggers's avatar
Thom Wiggers committed
22
    --module thaliawebsite.wsgi:application \
Thom Wiggers's avatar
Thom Wiggers committed
23
    --harakiri 1800 \
Thom Wiggers's avatar
Thom Wiggers committed
24
    --master \
Thom Wiggers's avatar
Thom Wiggers committed
25
26
    --max-requests 5000 \
    --vacuum \
Thom Wiggers's avatar
Thom Wiggers committed
27
28
    --limit-post 0 \
    --post-buffering 16384 \
Thom Wiggers's avatar
Thom Wiggers committed
29
    --logto '/concrexit/log/uwsgi.log'