Skip to content

Commit

Permalink
simplify docker commands
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Nov 16, 2023
1 parent f7521b8 commit 30082c9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lila-docker
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
set -e
#!/bin/bash -e

if [ ! -z "$GITPOD_WORKSPACE_ID" ]; then
export SCHEME=https
Expand Down Expand Up @@ -80,7 +79,7 @@ build_all_profiles() {

setup_database() {
# wait for mongodb to be ready
while ! docker exec $(docker compose ps -q mongodb) mongo --eval "db.adminCommand('ping')" > /dev/null 2>&1; do
while ! docker compose exec mongodb mongo --eval "db.adminCommand('ping')" > /dev/null 2>&1; do
echo "Waiting for mongodb to be ready..."
sleep 1
done
Expand All @@ -103,9 +102,7 @@ run_formatter() {
(test -f /chessground/package.json && cd /chessground && pnpm install && pnpm run format) || echo 'Skipping chessground' && \
(test -f /pgn-viewer/package.json && cd /pgn-viewer && pnpm install && pnpm run format) || echo 'Skipping pgn-viewer'"

docker run --rm -v $(pwd)/repos/lila:/lila \
sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.1_12_1.9.7_3.3.1 \
bash -c "cd /lila && sbt scalafmtAll"
docker compose run --rm --entrypoint "sbt scalafmtAll" lila
}

run_gitpod_welcome() {
Expand Down

0 comments on commit 30082c9

Please sign in to comment.