forked from gwu-libraries/sfm-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-runserver
27 lines (20 loc) · 938 Bytes
/
Dockerfile-runserver
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
FROM gwul/sfm-base@sha256:bf84472ee4819b86a90a39c184f190b5ab769026eb427fe784625f3148490e55
MAINTAINER Justin Littman <[email protected]>
ADD . /opt/sfm-ui/
WORKDIR /opt/sfm-ui
RUN pip install -r requirements/common.txt -r requirements/release.txt
#This is used to automatically create the admin user.
RUN pip install django-finalware==0.1.0
# Adds fixtures.
ADD docker/ui/fixtures.json /opt/sfm-setup/
ADD docker/ui/invoke_runserver.sh /opt/sfm-setup/
RUN chmod +x /opt/sfm-setup/invoke_runserver.sh
ADD docker/ui/setup_ui.sh /opt/sfm-setup/
RUN chmod +x /opt/sfm-setup/setup_ui.sh
ENV DJANGO_SETTINGS_MODULE=sfm.settings.docker_settings
ENV LOAD_FIXTURES=false
EXPOSE 8000
CMD sh /opt/sfm-setup/setup_reqs.sh \
&& appdeps.py --wait-secs 60 --port-wait db:5432 --file /opt/sfm-ui --port-wait mq:5672 --file-wait /sfm-data/collection_set \
&& sh /opt/sfm-setup/setup_ui.sh \
&& sh /opt/sfm-setup/invoke_runserver.sh