Improved testing

After the initializer scripts were removed, we didn't test the actual compose setup anymore. This adds new tests to run the database migrations.
This commit is contained in:
Tobias Genannt 2022-11-30 09:52:07 +01:00
parent 1779ba790d
commit 9441be459c
2 changed files with 23 additions and 7 deletions

View file

@ -3,12 +3,13 @@ services:
netbox:
image: ${IMAGE-netboxcommunity/netbox:latest}
depends_on:
- postgres
- redis
- redis-cache
postgres:
condition: service_healthy
redis:
condition: service_started
redis-cache:
condition: service_started
env_file: env/netbox.env
environment:
SKIP_STARTUP_SCRIPTS: ${SKIP_STARTUP_SCRIPTS-false}
user: 'unit:root'
volumes:
- ./configuration:/etc/netbox/config:z,ro
@ -19,6 +20,11 @@ services:
postgres:
image: postgres:15-alpine
env_file: env/postgres.env
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
command: