Skip to content

Commit fed4879

Browse files
authored
Merge pull request #894 from aaxelb/docs/clarifications-2026
[ENG-11345] improve docs and dev setup
2 parents fb50ce4 + 14d3303 commit fed4879

3 files changed

Lines changed: 15 additions & 29 deletions

File tree

‎docker-compose.yml‎

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,11 @@ services:
3838
user: "0"
3939
environment:
4040
- ELASTIC_PASSWORD=secretsecret
41-
- KIBANA_PASSWORD=${KIBANA_PASSWORD:-kibanakibana}
4241
command: >
4342
bash -c '
4443
if [ x$${ELASTIC_PASSWORD} == x ]; then
4544
echo "Set the ELASTIC_PASSWORD environment variable";
4645
exit 1;
47-
elif [ x$${KIBANA_PASSWORD} == x ]; then
48-
echo "Set the KIBANA_PASSWORD environment variable";
49-
exit 1;
5046
fi;
5147
if [ ! -f config/certs/ca.zip ]; then
5248
echo "Creating CA";
@@ -67,28 +63,19 @@ services:
6763
bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key;
6864
unzip config/certs/certs.zip -d config/certs;
6965
fi
70-
echo "Setting file permissions"
66+
echo "Setting cert file permissions (give read permission to all users -- may not be suitable for production)"
7167
chown -R root:root config/certs;
72-
find . -type d -exec chmod 750 \{\} \;;
73-
find . -type f -exec chmod 640 \{\} \;;
74-
echo "Waiting for Elasticsearch availability";
75-
until curl -s --cacert config/certs/ca/ca.crt https://elastic8:9200 | grep -q "missing authentication credentials"; do sleep 1; done;
76-
echo "Setting kibana_system password";
77-
until curl -s -X POST --cacert config/certs/ca/ca.crt -u "elastic:$${ELASTIC_PASSWORD}" -H "Content-Type: application/json" https://elastic8:9200/_security/user/kibana_system/_password -d "{\"password\":\"$${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 1; done;
68+
find . -type d -exec chmod 755 \{\} \;;
69+
find . -type f -exec chmod 644 \{\} \;;
7870
echo "All done!";
7971
'
80-
healthcheck:
81-
test: ["CMD-SHELL", "[ -f config/certs/singlenode/singlenode.crt ]"]
82-
interval: 1s
83-
timeout: 5s
84-
retries: 120
8572
networks:
8673
- share_network
8774

8875
elastic8:
8976
depends_on:
9077
elastic8_setup:
91-
condition: service_healthy
78+
condition: service_completed_successfully
9279
image: docker.elastic.co/elasticsearch/elasticsearch:8.18.3
9380
ports:
9481
- 9208:9200
@@ -115,7 +102,7 @@ services:
115102
- share_network
116103

117104
rabbitmq:
118-
image: rabbitmq:management
105+
image: rabbitmq:3.8-management
119106
ports:
120107
- 5673:5672
121108
- 15673:15672
@@ -165,8 +152,7 @@ services:
165152
context: .
166153
dockerfile: Dockerfile
167154
target: dev
168-
command:
169-
/bin/bash -c 'cp -r /elastic8_certs /elastic_certs && chown -R daemon:daemon /elastic_certs/ && /usr/local/bin/celery --app project worker --uid daemon -l INFO'
155+
command: /usr/local/bin/celery --app project worker --uid daemon -l INFO
170156
depends_on:
171157
- postgres
172158
- rabbitmq
@@ -181,7 +167,7 @@ services:
181167
- .docker-compose.env
182168
environment:
183169
- ELASTICSEARCH8_SECRET=secretsecret
184-
- ELASTICSEARCH8_CERT_PATH=/elastic_certs/ca/ca.crt
170+
- ELASTICSEARCH8_CERT_PATH=/elastic8_certs/ca/ca.crt
185171
stdin_open: true
186172
networks:
187173
- share_network

‎how-to/run-locally.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ docker-compose up -d postgres elastic8
4343
since we're not installing anything more on the host machine, it'll be useful to open
4444
a shell running within SHARE's environment in docker:
4545
```
46-
docker-compose run --rm --no-deps worker bash
46+
docker-compose run --rm --no-deps indexer bash
4747
```
48-
this will open a bash prompt within a temporary `worker` container -- from here we can
48+
this will open a bash prompt within a temporary `indexer` container -- from here we can
4949
run commands within SHARE's environment, including django's `manage.py`
5050

51-
from within that worker shell, use django's `migrate` command to create tables in postgres:
51+
from within that indexer shell, use django's `migrate` command to create tables in postgres:
5252
```
5353
python manage.py migrate
5454
```
@@ -94,14 +94,14 @@ docker-compose up -d worker
9494
there are several ways to open a shell with SHARE's environment (which has
9595
django's `manage.py` and management commands defined in `management/commands/`
9696
97-
if `worker` is already up, can open a shell within that container:
97+
if `indexer` is already up, can open a shell within that container:
9898
```
99-
docker-compose exec worker bash
99+
docker-compose exec indexer bash
100100
```
101101
102-
if no services are up, can open a shell within a new, temporary `worker` container:
102+
if no services are up, can open a shell within a new, temporary `indexer` container:
103103
```
104-
docker-compose run --rm --no-deps worker bash
104+
docker-compose run --rm --no-deps indexer bash
105105
```
106106
(remove `--no-deps` if you'd like the other services started automatically)
107107

‎how-to/use-the-api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
`GET /trove/browse?iri=...`: inquire about a thing you have already identified
1010

11-
(see [openapi docs](/trove/docs/openapi.html) for detail and available parameters)
11+
(see [openapi docs](https://share.osf.io/trove/docs) for detail and available parameters)
1212

1313

1414
### Posting index-cards

0 commit comments

Comments
 (0)