Skip to content

Commit

Permalink
Merge 598d100 into d2be83c
Browse files Browse the repository at this point in the history
  • Loading branch information
rstorey committed Jun 25, 2019
2 parents d2be83c + 598d100 commit 00e1aab
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 72 deletions.
6 changes: 0 additions & 6 deletions build_containers.sh
Expand Up @@ -42,7 +42,6 @@ if [ $BUILD_ALL -eq 1 ]; then

docker build -t concordia/importer --file importer/Dockerfile .
docker build -t concordia/celerybeat --file celerybeat/Dockerfile .
docker build -t concordia/indexer --file indexer/Dockerfile .

if [ $PUBLISH_CONTAINERS -eq 1 ]; then
docker tag concordia/importer:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/importer:${VERSION_NUMBER}"
Expand All @@ -54,10 +53,5 @@ if [ $BUILD_ALL -eq 1 ]; then
docker tag concordia/celerybeat:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/celerybeat:${TAG}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/celerybeat:${VERSION_NUMBER}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/celerybeat:${TAG}"

docker tag concordia/indexer:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/indexer:${VERSION_NUMBER}"
docker tag concordia/indexer:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/indexer:${TAG}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/indexer:${VERSION_NUMBER}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/indexer:${TAG}"
fi
fi
16 changes: 16 additions & 0 deletions concordia/tasks.py
Expand Up @@ -2,6 +2,7 @@

from celery import task
from django.contrib.auth.models import User
from django.core.management import call_command
from django.db.models import Count
from more_itertools.more import chunked

Expand Down Expand Up @@ -238,3 +239,18 @@ def populate_asset_years():
updated_count += len(changed_assets)

return updated_count


@task
def create_elasticsearch_indices():
call_command("search_index", action="create")


@task
def populate_elasticsearch_indices():
call_command("search_index", action="populate")


@task
def delete_elasticsearch_indices():
call_command("search_index", action="delete")
15 changes: 0 additions & 15 deletions docker-compose.yml
Expand Up @@ -64,21 +64,6 @@ services:
volumes:
- images_volume:/concordia_images

indexer:
restart: unless-stopped
build:
context: .
dockerfile: indexer/Dockerfile
environment:
<<: *django-environment
WAIT_HOSTS: db:5432, redis:6379, elasticsearch:9200
ELASTICSEARCH_ENDPOINT: http://elasticsearch:9200
depends_on:
- db
- elasticsearch
links:
- elasticsearch

celerybeat:
restart: unless-stopped
build:
Expand Down
39 changes: 0 additions & 39 deletions indexer/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions indexer/entrypoint.sh

This file was deleted.

0 comments on commit 00e1aab

Please sign in to comment.