diff --git a/backend/bydate.json b/backend/bydate.json new file mode 100644 index 0000000..66bcbfb --- /dev/null +++ b/backend/bydate.json @@ -0,0 +1,13 @@ +{ + "ddoc": "_design/fbca874dfe74bc7c49c79c60809824e75f66a89a", + "name": "bydate", + "type": "json", + "partitioned": false, + "def": { + "fields": [ + { + "issued": "asc" + } + ] + } + } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c869e87..bcb899c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,18 @@ services: command: - | curl -X POST http://backend:5984/database_joblinker_prot3/_bulk_docs -H "Content-Type: application/json" -d @/sample_data.json + depends_on: + accessible_backend: + condition: service_completed_successfully + + index: + image: curlimages/curl + entrypoint: ["/bin/sh","-c"] + volumes: + - ./backend/bydate.json:/bydate.json + command: + - | + curl -X POST http://backend:5984/database_joblinker_prot3/_index -H "Content-Type: application/json" -d @/bydate.json -u '${COUCHDB_USER}:${COUCHDB_PASSWORD}' depends_on: accessible_backend: condition: service_completed_successfully \ No newline at end of file