aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 5bf5ef67311aad5a2728fc7bfe545931bc006d48 (plain)
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
FROM linaro/ci-amd64-llp-alpine

ADD . /srv/linaro-license-protection

ADD secrets.py /srv/secrets.py
RUN echo "*" >> /srv/allowed_hosts.txt
ENV allowed_hosts="*"
#ENV DJANGO_DEBUG="y"
RUN /srv/linaro-license-protection/manage.py migrate # Used to build the sqlite database. Temp fix as codebase needs to be updated to delete old DB calls

RUN pip install -r /srv/linaro-license-protection/requirements.txt

# README
# Mount a docker "bind" mount for on-the-fly reloading
#
# Run Django in debug mode a.k.a "runserver"
#
#
# docker run -it --mount src="$(pwd)",target=/srv/linaro-license-protection,type=bind -e DJANGO_DEBUG=Y -e DJANGO_MIGRATE=Y -e DJANGO_COLLECTSTATIC=Y -e DJANGO_SETTINGS_MODULE=settings -p 8080:8080 linaro/ci-amd64-llp-alpine
#
#
# Run in "production" mode
# Run docker in "S3" mode (settings.production) in django runserver
# Requires putting snapshots/releases.linaro.org into /etc/hosts and secrets.py being copied
#
# docker run -it --mount src="$(pwd)",target=/srv/linaro-license-protection,type=bind -e allowed_hosts=snapshots.linaro.org -p 8080:8080 linaro/ci-amd64-llp-alpine
#
#