Last active
January 2, 2016 04:39
-
-
Save metalivedev/8251577 to your computer and use it in GitHub Desktop.
Containerizing RTD. Requires 1GB of RAM to compile in a VM.
This version does all the apt-get's in one layer and sets up the database.
You'll still need to use ./manage.py updatepassword manually -- haven't figured out how to automate that yet.
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 | |
# Add the Universe to the repo list | |
RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list | |
RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe' >> /etc/apt/sources.list | |
# You might also need redis, nginx, postgres, and celeryd to work like production RTD. | |
# openssh-server is optional and just makes it easier to interact with the container later. | |
RUN apt-get update && apt-get install -y gcc git openssh-server python-pip python-dev libxml2-dev libxslt1-dev | |
RUN git clone http://github.com/rtfd/readthedocs.org.git | |
RUN cd readthedocs.org && pip install -r pip_requirements.txt | |
RUN cd readthedocs.org && ./manage.py syncdb --noinput && LANG=en_US ./manage.py createsuperuser --noinput --username=root [email protected] && ./manage.py migrate --noinput |
The admin account needs a password, but the db's are set up.
Note that createsuperuser
required a locale, so I set it to en_US, though en_US is not actually installed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is really early. It seems to get all the dependencies built, but it doesn't (yet):
run manage.py, so no admin account yet, no db's set upTo use, do something like this:
That will get you a shell where you can do the manage.py things manually (for now)