Last active
November 4, 2016 18:56
-
-
Save krlsdu/eb3017fc109ae7a2917b4e47330fbf99 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 postgres | |
FROM memcached | |
FROM python:2 | |
RUN apt-get update -y | |
RUN apt-get install -y vim | |
RUN mkdir /site/ | |
WORKDIR /site/ | |
ADD requirements.txt /site/ | |
RUN pip install -r requirements.txt | |
RUN askbot-setup --dir-name=. \ | |
--db-engine=${ASKBOT_DATABASE_ENGINE:-1} \ | |
--db-name="askbot" \ | |
--db-user="askbot" \ | |
--db-password="askbot" | |
RUN python manage.py collectstatic --noinput | |
RUN sed "s/ROOT_URLCONF.*/ROOT_URLCONF = 'urls'/" settings.py -i | |
RUN sed "s/'HOST':.*/'HOST': 'postgres',/" settings.py -i | |
RUN sed "s/LANGUAGE_CODE = 'en'/LANGUAGE_CODE = 'pt-br'/" settings.py -i | |
RUN sed "s/'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'/'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache'/" settings.py -i | |
RUN sed "s/'LOCATION': 'askbot'/'LOCATION': 'memcached:11211'/" settings.py -i | |
CMD python manage.py runserver `hostname -i`:8080 | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment