Skip to content

Commit

Permalink
Merge branch 'main' into ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev authored Mar 16, 2024
2 parents 7385e21 + 4cc9a9d commit 2a6fe99
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 27 deletions.
9 changes: 7 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ ports:
- port: 3001
name: picfit
onOpen: ignore
- port: 5601
name: kibana
- port: 8092
name: elasticvue
description: Elasticsearch manager
onOpen: ignore
- port: 9200
name: elasticsearch
description: Elasticsearch
onOpen: ignore
visibility: public

vscode:
extensions:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ Always available:
| Service | URL |
| ------------------ | ---------------------- |
| Main lila instance | http://localhost:8080/ |
| Mongodb manager | http://localhost:8081/ |
| Email inbox | http://localhost:8025/ |

Depending on which optional services you start:

| Service | URL |
| --------------------- | -------------------------------------------------------- |
| Mongodb manager | http://localhost:8081/ |
| Email inbox | http://localhost:8025/ |
| lila-gif | http://localhost:6175/image.gif?fen=4k3/6KP/8/8/8/8/7p/8 |
| Picfit | http://localhost:3001/healthcheck |
| Elasticsearch manager | http://localhost:5601/ |
| Elasticsearch manager | http://localhost:8092/ |
| API docs | http://localhost:8089/ |
| Chessground | http://localhost:8090/demo.html |
| PGN Viewer | http://localhost:8091/ |
Expand Down
20 changes: 10 additions & 10 deletions command/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions command/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,22 @@ fn prompt_for_optional_services() -> Result<Vec<OptionalService<'static>>, Error
"Select which optional services to include:\n (Use arrows, <space> to toggle, <enter> to continue)\n",
)
.required(false)
.item(
OptionalService {
compose_profile: vec!["mongo-express"].into(),
repositories: None,
},
"Database admin interface",
"Mongo Express for viewing database structure and data",
)
.item(
OptionalService {
compose_profile: vec!["email"].into(),
repositories: None,
},
"Outbound email testing",
"for capturing and debugging outbound email",
)
.item(
OptionalService {
compose_profile: vec!["stockfish-play"].into(),
Expand Down
1 change: 1 addition & 0 deletions conf/elasticvue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{ "name": "lila", "uri": "http://localhost:9200" }]
25 changes: 16 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ services:
dockerfile: lila-fishnet.Dockerfile
environment:
- KAMON_ENABLED=${ENABLE_MONITORING:-false}
# - HTTP_API_LOGGER=true
restart: unless-stopped
networks:
- lila-network
Expand Down Expand Up @@ -189,24 +190,26 @@ services:
image: elasticsearch:7.17.4
restart: unless-stopped
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- http.cors.allow-origin=/.*/
- http.cors.enabled=true
- xpack.security.enabled=false
networks:
- lila-network
ports:
- 9200:9200
profiles:
- search

kibana:
image: kibana:7.17.4
elasticvue:
image: cars10/elasticvue:1.0.4
restart: unless-stopped
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
volumes:
- ./conf/elasticvue.json:/usr/share/nginx/html/api/default_clusters.json
ports:
- 5601:5601
- 8092:8080
networks:
- lila-network
depends_on:
- elasticsearch
profiles:
- search

Expand Down Expand Up @@ -252,12 +255,14 @@ services:
- thumbnails

mailpit:
image: axllent/mailpit:v1.14.1
image: axllent/mailpit:v1.14.4
restart: unless-stopped
ports:
- 8025:8025
networks:
- lila-network
profiles:
- email

mongo_express:
image: mongo-express:1.0.2-20-alpine3.19
Expand All @@ -271,6 +276,8 @@ services:
- lila-network
depends_on:
- mongodb
profiles:
- mongo-express

influxdb:
image: influxdb:2.7.5-alpine
Expand Down
3 changes: 3 additions & 0 deletions docker/lila-fishnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ENV CONFIG_FORCE_kamon_influxdb_authentication_token="secret"
ENV CONFIG_FORCE_kamon_influxdb_hostname="influxdb"
ENV REDIS_HOST="redis"

ENV APP_BACKUP_FILE=/backup.json
RUN touch "$APP_BACKUP_FILE"

WORKDIR /lila-fishnet

ENTRYPOINT sbt app/run
7 changes: 4 additions & 3 deletions lila-docker
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ run_start() {
run_setup
else
if [ ! -z "$(docker compose ps -a --services --status=exited | xargs)" ]; then
docker compose start
COMPOSE_PROFILES=$(all_profiles) docker compose start
else
echo "There are no stopped services to resume"
fi
Expand Down Expand Up @@ -64,8 +64,9 @@ setup_database() {
--tokens \
--es --es-host=elasticsearch:9200

docker compose run --rm mongodb mongo --quiet --host mongodb lichess /lila/bin/mongodb/indexes.js
docker compose run --rm mongodb mongo --quiet --host mongodb lichess /lila/bin/mongodb/create-trophy-kinds.js
echo "Creating database indexes..."
docker compose exec mongodb mongo --quiet lichess /lila/bin/mongodb/indexes.js
docker compose exec mongodb mongo --quiet lichess /lila/bin/mongodb/create-trophy-kinds.js
docker compose run --rm python python /scripts/users.py
}

Expand Down

0 comments on commit 2a6fe99

Please sign in to comment.