Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Add docker volumes for local development (#408)

Madison Swain-Bowdene1e85888b821
diff --git a/docker-compose.yml b/docker-compose.yml
index a0285b100..853bdc733 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -8,6 +8,8 @@ services:
- postgres/env.docker
healthcheck:
test: "pg_isready -U deploy -d openledger"
+ volumes:
+ - api-postgres:/var/lib/postgresql/data
thumbs:
image: willnorris/imageproxy
@@ -20,6 +22,7 @@ services:
ports:
- "5433:5432"
volumes:
+ - catalog-postgres:/var/lib/postgresql/data
- ./sample_data:/sample_data
env_file:
- postgres/env.docker
@@ -53,6 +56,8 @@ services:
# Set this value to an empty string to remove the limit
# https://docs.docker.com/compose/compose-file/compose-file-v2/#cpu-and-other-resources
mem_limit: ${ES_MEM_LIMIT:-4294967296} # 4 GiB in bytes
+ volumes:
+ - es-data:/usr/share/elasticsearch/data
web:
build: ./openverse_api/
@@ -113,3 +118,8 @@ services:
- ./analytics:/analytics
env_file:
- ./analytics/env.docker
+
+volumes:
+ api-postgres:
+ catalog-postgres:
+ es-data: