forked from ehazlett/shipyard
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
22 lines (21 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM base
MAINTAINER Evan Hazlett "[email protected]"
RUN apt-get -qq update
RUN apt-get install -y python-dev python-setuptools libxml2-dev libxslt-dev libmysqlclient-dev supervisor redis-server git-core
RUN easy_install pip
RUN pip install virtualenv
RUN pip install uwsgi
RUN virtualenv --no-site-packages /opt/ve/shipyard
ADD . /opt/apps/shipyard
ADD .docker/supervisor.conf /opt/supervisor.conf
ADD .docker/known_hosts /root/.ssh/known_hosts
ADD .docker/run.sh /usr/local/bin/run
RUN (find /opt/apps/shipyard -name "*.db" -delete)
RUN (cd /opt/apps/shipyard && git remote rm origin)
RUN (cd /opt/apps/shipyard && git remote add origin https://github.com/ehazlett/shipyard.git)
RUN /opt/ve/shipyard/bin/pip install -r /opt/apps/shipyard/requirements.txt
RUN (cd /opt/apps/shipyard && /opt/ve/shipyard/bin/python manage.py syncdb --noinput)
RUN (cd /opt/apps/shipyard && /opt/ve/shipyard/bin/python manage.py migrate)
RUN (cd /opt/apps/shipyard && /opt/ve/shipyard/bin/python manage.py update_admin_user --username=admin --password=shipyard)
EXPOSE 8000
CMD ["/bin/sh", "-e", "/usr/local/bin/run"]