diff --git a/README-docker-compose.md b/README-docker-compose.md index dab0834411a..8e2fb5098ef 100644 --- a/README-docker-compose.md +++ b/README-docker-compose.md @@ -110,7 +110,11 @@ #### Special Instructions for Apple Chipset (M1, M2, etc.) and other ARM64 architecture - * _NOTE: The `elasticsearch`, `elasticsearch6`, and `sharejs` containers are incompatible with ARM64._ + * _NOTE: The default `elasticsearch`, `elasticsearch6`, and `sharejs` containers are incompatible with ARM64._ + + - To run `elasticsearch6` on ARM64 architecture: + + - Copy `docker-compose-dist-arm64.override.yml` into your `docker-compose.override.yml` file - Running containers with docker compose @@ -120,20 +124,6 @@ SEARCH_ENGINE = None ``` - - Building the Docker image - - - If you wish to use an OSF image other than the latest `develop-arm64`: - - Build the image - ```bash - cd - git checkout - docker buildx build --platform linux/arm64 -t osf:-arm64 . - ``` - - In `docker-compose.override.yml`, replace any `quay.io/centerforopenscience/osf:develop-arm64` with the locally-tagged image above: - ```yml - image: osf:-arm64 - ``` - ## Application Runtime * _NOTE: Running docker containers detached (`-d`) will execute them in the background, if you would like to view/follow their console log output use the following command._ diff --git a/api/base/settings/defaults.py b/api/base/settings/defaults.py index d74e744f787..a7d8838fe04 100644 --- a/api/base/settings/defaults.py +++ b/api/base/settings/defaults.py @@ -317,7 +317,7 @@ # django-elasticsearch-metrics ELASTICSEARCH_DSL = { 'default': { - 'hosts': os.environ.get('ELASTIC6_URI', '127.0.0.1:9201'), + 'hosts': osf_settings.ELASTIC6_URI, 'retry_on_timeout': True, }, } diff --git a/conftest.py b/conftest.py index 1acfabbdbb5..2eb51df076e 100644 --- a/conftest.py +++ b/conftest.py @@ -124,7 +124,7 @@ def _test_speedups_disable(request, settings, _test_speedups): @pytest.fixture(scope='session') def setup_connections(): - connections.create_connection(hosts=['http://localhost:9201']) + connections.create_connection(hosts=[website_settings.ELASTIC6_URI]) @pytest.fixture(scope='function') diff --git a/docker-compose-dist-arm64.override.yml b/docker-compose-dist-arm64.override.yml index aad331ae1a7..cffa4bd8982 100644 --- a/docker-compose-dist-arm64.override.yml +++ b/docker-compose-dist-arm64.override.yml @@ -6,43 +6,6 @@ services: # OSF # ####### - requirements: - image: quay.io/centerforopenscience/osf:develop-arm64 + elasticsearch6: + image: quay.io/centerforopenscience/elasticsearch:es6-arm-6.3.1 platform: linux/arm64 - - assets: - image: quay.io/centerforopenscience/osf:develop-arm64 - platform: linux/arm64 - # Need to allocate tty to be able to call invoke for requirements task - tty: true - - admin_assets: - image: quay.io/centerforopenscience/osf:develop-arm64 - platform: linux/arm64 - # Need to allocate tty to be able to call invoke for requirements task - tty: true - - worker: - image: quay.io/centerforopenscience/osf:develop-arm64 - platform: linux/arm64 - # Need to allocate tty to be able to call invoke for requirements task - tty: true - - admin: - image: quay.io/centerforopenscience/osf:develop-arm64 - platform: linux/arm64 - # Need to allocate tty to be able to call invoke for requirements task - tty: true - - api: - image: quay.io/centerforopenscience/osf:develop-arm64 - platform: linux/arm64 - # Need to allocate tty to be able to call invoke for requirements task - tty: true - - web: - image: quay.io/centerforopenscience/osf:develop-arm64 - platform: linux/arm64 - # Need to allocate tty to be able to call invoke for requirements task - tty: true - diff --git a/website/settings/defaults.py b/website/settings/defaults.py index 7d6df427336..b305fe0fd88 100644 --- a/website/settings/defaults.py +++ b/website/settings/defaults.py @@ -105,6 +105,7 @@ def parent_dir(path): SEARCH_ENGINE = 'elastic' # Can be 'elastic', or None ELASTIC_URI = '127.0.0.1:9200' +ELASTIC6_URI = os.environ.get('ELASTIC6_URI', '127.0.0.1:9201') ELASTIC_TIMEOUT = 10 ELASTIC_INDEX = 'website' ELASTIC_KWARGS = {