Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker-compose volumne #207

Open
epicserve opened this issue Jun 3, 2018 · 1 comment
Open

Add docker-compose volumne #207

epicserve opened this issue Jun 3, 2018 · 1 comment

Comments

@epicserve
Copy link

Could a volume be added so you don't have to run /venv/bin/python manage.py load_inital_data every time you start up the demo site after having run docker-compose down? Here is what you would need to add, but you might have to add volumes to other services as well. What I did wasn't working all the way because the images weren't loading on the home page after running docker-compose down.

diff --git a/docker-compose.yml b/docker-compose.yml
index b96f0b4..a1b3910 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -10,6 +10,8 @@ services:
     image: postgres:9.6
     expose:
       - "5432"
+    volumes:
+      - postgres_data:/var/lib/postgresql/data/
   redis:
     restart: always
     image: redis:3.0
@@ -39,3 +41,5 @@ services:
       - db
       - redis
       - elasticsearch
+volumes:
+  postgres_data:
@benhadad
Copy link

benhadad commented Aug 9, 2019

Wouldn't this also help solve the problem with running it on windows where the data doesn't load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants