Stephan Ellis
unread,Apr 16, 2017, 12:11:14 AM4/16/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pylons-...@googlegroups.com
Hi All,
I've been using pyramid for a while, but only recently Docker for my
projects. I really like the idea of using docker for packaging my
apps for deployment, but I like the idea of development inside
containers even better.
I've been using docker-compose to compose my dev environment, for
example containers for couchdb, redis and my pyramid app (created
using the starter template). I can get it to link up those containers
and everything works as expected, great! The only problem is that the
procedure the starter template uses to install my app's package for
development. Here's my Dockerfile:
FROM python:3.4
WORKDIR /opt/testapp
ADD . .
RUN python setup.py develop
ENV PYTHONUNBUFFERED=true
EXPOSE 6543
CMD ["pserve", "--reload", "development.ini"]
The problem is that every time I change anything in the project
directory, the image will rerun setup.py, resulting in slow startup
for obvious reasons. The only reason I would need to run that again
was if I changed the list of required packages in the setup.py file.
I have been struggling to find an elegant solution to this problem.
Can anyone point me in the right direction?
Thanks!
-stephan