entrypoint_production.sh 540 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
18
19
20
    --uid 33 \
    --gid 33 \
    --threads 5 \
    --processes 5 \
Thom Wiggers's avatar
Thom Wiggers committed
21
22
    --module thaliawebsite.wsgi:application \
    --harakiri 20 \
Thom Wiggers's avatar
Thom Wiggers committed
23
    --master \
Thom Wiggers's avatar
Thom Wiggers committed
24
25
    --max-requests 5000 \
    --vacuum \
Thom Wiggers's avatar
Thom Wiggers committed
26
    --logto '/concrexit/log/uwsgi.log'