Created
October 17, 2014 13:04
-
-
Save lcamacho/0f8b3d751c19dfd16a5c to your computer and use it in GitHub Desktop.
Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
MAINTAINER Leonard Camacho <[email protected]> | |
RUN apt-get update && apt-get install -y python python-dev python-pip postgresql libpq-dev memcached libxml2-dev libxslt1-dev | |
ADD . /airmozilla | |
WORKDIR /airmozilla | |
RUN pip install -r requirements/compiled.txt | |
# If you're going to run tests uncomment this | |
RUN pip install -r requirements/dev.txt | |
USER postgres | |
RUN /etc/init.d/postgresql start && psql -c "ALTER ROLE postgres WITH ENCRYPTED PASSWORD 'mozilla'" &&\ | |
createdb -T template0 -E UTF8 airmozilla && ./manage.py syncdb --noinput && ./manage.py migrate | |
USER root | |
#RUN chmod +x ./entry_point.sh | |
ENTRYPOINT ["./entry_point.sh"] | |
EXPOSE 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/etc/init.d/postgresql start | |
/etc/init.d/memcached start | |
./manage.py runserver 0.0.0.0:8000 | |
exec "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment