-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·48 lines (39 loc) · 1 KB
/
build.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
# fail on any command exiting non-zero
set -eo pipefail
if [[ -z $DOCKER_BUILD ]]; then
echo
echo "Note: this script is intended for use by the Dockerfile and not as a way to build the controller locally"
echo
exit 1
fi
# install required system packages
apk add --update-cache \
build-base \
curl \
libffi-dev \
libpq \
openldap \
openldap-dev \
postgresql-dev \
python \
python-dev
# install pip
curl -sSL https://raw.githubusercontent.com/pypa/pip/7.0.3/contrib/get-pip.py | python -
# add a deis user
adduser deis -D -h /app -s /bin/bash
# create a /app directory for storing application data
mkdir -p /app && chown -R deis:deis /app
# create directory for confd templates
mkdir -p /templates && chown -R deis:deis /templates
# install dependencies
pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt
# cleanup.
apk del --purge \
build-base \
curl \
libffi-dev \
openldap-dev \
postgresql-dev \
python-dev
rm -rf /var/cache/apk/*