Skip to content

Add docker-compose volumne #207

@epicserve

Description

@epicserve

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions