Skip to content

Commit

Permalink
racy: remove postgres (faster startup) and add/wait on health-check (…
Browse files Browse the repository at this point in the history
…no test race)
  • Loading branch information
aronatkins committed Jun 20, 2024
1 parent d7a0b82 commit 09dee6c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ distclean: clean
.PHONY: up
up: .require-license
docker-compose port connect 3939 2>/dev/null | if ! grep -q ':23939$$'; then \
docker-compose up -d; \
docker-compose up -d --wait; \
fi

.PHONY: down
Expand Down
4 changes: 0 additions & 4 deletions __tests__/rstudio-connect.test.gcfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ InsecureDefaultUserAPIKey = true
APIKeyBcryptCost = 4

[Database]
Provider = Postgres
SeedUsers = true

[HTTP]
Listen = :3939
NoWarning = true

[Postgres]
URL = postgres://postgres:notasecret@db/postgres?sslmode=disable

[Python]
Enabled = true
Executable = /opt/python/3.12.1/bin/python
Expand Down
12 changes: 4 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
services:
db:
image: postgres:12
volumes:
- ./.cache/pgdata:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: notasecret
connect:
privileged: true
depends_on:
- db
image: rstudio/rstudio-connect:ubuntu2204-2024.05.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3939/"]
start_period: 30s
start_interval: 1s
volumes:
- ./.cache/data:/data
- ./__tests__/rstudio-connect.test.gcfg:/etc/rstudio-connect/rstudio-connect.gcfg
Expand Down

0 comments on commit 09dee6c

Please sign in to comment.