Skip to content

Commit

Permalink
chore(docker): correct CL_BASE_DIR interpolation
Browse files Browse the repository at this point in the history
The entire source that is specified for the volume at
`/opt/courtlistener` is interpolated:

```
${CL_BASE_DIR:-../../../courtlistener}:/opt/courtlistener
```

This appears to have brought about a misapprehension of what
should be interpolated: in 1a57939 a files full path was the
default value for `CL_BASE_DIR`:

```
- ${CL_BASE_DIR:-../../../courtlistener/cl/search/elasticsearch_files/synonyms_en.txt}:/usr/share/elasticsearch/config/synonyms_en.txt
- ${CL_BASE_DIR:-../../../courtlistener/cl/search/elasticsearch_files/stopwords_en.txt}:/usr/share/elasticsearch/config/stopwords_en.txt
- ${CL_BASE_DIR:-../../../courtlistener/cl/search/elasticsearch_files/protwords_en.txt}:/usr/share/elasticsearch/config/protwords_en.txt
```

There's no way that `CL_BASE_DIR`, if specified, could satisfy
these usages as well as `/opt/courtlistener`. The intent is clear
that it should stand-in for base directory and not any of its files.
This patch adopts that understanding.
  • Loading branch information
cweider committed Oct 21, 2024
1 parent b58c36c commit 6cfd7e1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docker/courtlistener/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ services:
container_name: cl-webpack
image: node:16
volumes:
- ${CL_BASE_DIR:-../../../courtlistener}:/opt/courtlistener
- ${CL_BASE_DIR:-../../}:/opt/courtlistener
env_file:
- ../../.env.dev
working_dir: /opt/courtlistener/cl
Expand All @@ -79,7 +79,7 @@ services:
- cl-disclosures
volumes:
- ${CL_POSTGRES_RUN_DIR:-/var/run/postgresql}:/var/run/postgresql
- ${CL_BASE_DIR:-../../../courtlistener}:/opt/courtlistener
- ${CL_BASE_DIR:-../../}:/opt/courtlistener
networks:
- cl_net_overlay
env_file:
Expand Down Expand Up @@ -111,8 +111,8 @@ services:
user: root
volumes:
- ${CL_POSTGRES_RUN_DIR:-/var/run/postgresql}:/var/run/postgresql
- ${CL_BASE_DIR:-../../../courtlistener}:/opt/courtlistener
- ${CL_BASE_DIR:-../../../courtlistener/.postgresql}:/root/.postgresql
- ${CL_BASE_DIR:-../../}:/opt/courtlistener
- ${CL_BASE_DIR:-../../}/.postgresql:/root/.postgresql
networks:
- cl_net_overlay
env_file:
Expand Down Expand Up @@ -176,11 +176,11 @@ services:
soft: 500
hard: 600
volumes:
- ${CL_BASE_DIR:-../../../courtlistener/docker/elastic/cl-es.crt}:/usr/share/elasticsearch/config/certs/cl-es.crt
- ${CL_BASE_DIR:-../../../courtlistener/docker/elastic/cl-es.key}:/usr/share/elasticsearch/config/certs/cl-es.key
- ${CL_BASE_DIR:-../../../courtlistener/docker/elastic/ca.crt}:/usr/share/elasticsearch/config/certs/ca.crt
- ${CL_BASE_DIR:-../../../courtlistener/cl/search/elasticsearch_files/synonyms_en.txt}:/usr/share/elasticsearch/config/dictionaries/synonyms_en.txt
- ${CL_BASE_DIR:-../../../courtlistener/cl/search/elasticsearch_files/stopwords_en.txt}:/usr/share/elasticsearch/config/dictionaries/stopwords_en.txt
- ${CL_BASE_DIR:-../../}/docker/elastic/cl-es.crt:/usr/share/elasticsearch/config/certs/cl-es.crt
- ${CL_BASE_DIR:-../../}/docker/elastic/cl-es.key:/usr/share/elasticsearch/config/certs/cl-es.key
- ${CL_BASE_DIR:-../../}/docker/elastic/ca.crt:/usr/share/elasticsearch/config/certs/ca.crt
- ${CL_BASE_DIR:-../../}/cl/search/elasticsearch_files/synonyms_en.txt:/usr/share/elasticsearch/config/dictionaries/synonyms_en.txt
- ${CL_BASE_DIR:-../../}/cl/search/elasticsearch_files/stopwords_en.txt:/usr/share/elasticsearch/config/dictionaries/stopwords_en.txt
ports:
- "9200:9200"
networks:
Expand Down

0 comments on commit 6cfd7e1

Please sign in to comment.