Skip to content

Commit

Permalink
Update to Elasticsearch 8.15
Browse files Browse the repository at this point in the history
Repository-{s3,gcs} are now included in ES, so don't need to be
installed.
  • Loading branch information
arp242 committed Oct 17, 2024
1 parent e1494de commit a0d0b8a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 39 deletions.
44 changes: 17 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
name: package

on:
push: {}
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
name: 'package'
on:
push:
branches: ['main']

permissions:
packages: write
packages: 'write'

jobs:
docker:
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- name: Login to DockerHub
uses: docker/login-action@v1
- uses: 'actions/checkout@v4'

- uses: 'docker/login-action@v3'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
registry: 'ghcr.io'
username: '${{ github.repository_owner }}'
password: '${{ secrets.GITHUB_TOKEN }}'

- uses: 'docker/build-push-action@v6'
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/alephdata/aleph-elasticsearch:${{ github.sha }}
context: '.'
push: true
tags: 'ghcr.io/occrp/alfred-elasticsearch:${{ github.sha }}'
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM elasticsearch:7.16.3
LABEL org.opencontainers.image.source = "https://github.com/alephdata/aleph-elasticsearch"
FROM elasticsearch:8.15.2
LABEL org.opencontainers.image.source="https://github.com/alephdata/aleph-elasticsearch"

RUN bin/elasticsearch-plugin install --batch repository-s3 \
&& bin/elasticsearch-plugin install --batch repository-gcs \
&& bin/elasticsearch-plugin install --batch analysis-icu
RUN bin/elasticsearch-plugin install --batch analysis-icu

COPY k8s-entrypoint.sh /k8s-entrypoint.sh
COPY --chown=elasticsearch synonames.txt /usr/share/elasticsearch/config/
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ TAG=latest
all: push

build:
docker build -t alephdata/aleph-elasticsearch:$(TAG) .
docker buildx build -t occrp/alfred-elasticsearch:$(TAG) .

run: build
docker run -ti alephdata/aleph-elasticsearch:$(TAG) bash
docker run -ti occrp/alfred-elasticsearch:$(TAG) bash

exec: build
docker run -ti -v $(PWD)/secrets:/secrets alephdata/aleph-elasticsearch:$(TAG)
docker run -ti -v $(PWD)/secrets:/secrets occrp/alfred-elasticsearch:$(TAG)

push: build
docker push alephdata/aleph-elasticsearch:$(TAG)
docker push occrp/alfred-elasticsearch:$(TAG)
6 changes: 3 additions & 3 deletions k8s-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ echo "create keystore"
shopt -s nullglob

for SECRETFILE in /secrets/*; do
KEYNAME=$(basename $SECRETFILE);
echo "$KEYNAME from $SECRETFILE";
/usr/share/elasticsearch/bin/elasticsearch-keystore add-file $KEYNAME $SECRETFILE;
KEYNAME=$(basename "$SECRETFILE")
echo "$KEYNAME from $SECRETFILE"
/usr/share/elasticsearch/bin/elasticsearch-keystore add-file "$KEYNAME" "$SECRETFILE"
done

# Call original entrypoint script
Expand Down

0 comments on commit a0d0b8a

Please sign in to comment.