Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PSQL as docker compose service #26

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ setup:
docker compose build
docker compose run inferno bundle exec rake db:migrate

generate:
docker compose run inferno bundle exec rake au_core:generate

run:
docker compose build
docker compose up

run-production:
docker compose build
docker compose -f docker-compose.yml -f docker-compose.production.yml up

stop:
docker compose stop

down:
docker compose down

generate:
bundle exec rake au_core:generate
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
# AU Core Test Kit
# AU FHIR Core Inferno 🔥
This is an [Inferno](https://inferno-framework.github.io/inferno-core/) test kit for the [AU Core Implementation Guide](http://hl7.org.au/fhir/core/)

## Dev version
Please try dev version here http://au-inferno.beda.software/
**Currently available versions:**
1. [v0.3.0-ballot](http://hl7.org.au/fhir/core/0.3.0-ballot/)

## Generate tests
## Use inferno as a service
You can test your FHIR server using this link https://inferno.hl7.org.au/

1. Put your IG in the folder
```bash
/lib/au_core_test_kit/igs
```
2. Execute ruby script
```bash
make generate
```

## Run inferno
1. Run setup script
## Run inferno locally via Docker
It is highly recommended that you use Docker to run these tests. This test kit requires at least 10 GB of memory are available to Docker.
1. Clone this repo.
2. Run the setup script to initialize the database
```bash
make setup
```
2. Run
3. Run project
```bash
make run
```
4. Navigate to http://localhost. The AU Core test suite will be available.

## Run production
```bash
make run-production
```
## Additional information
1. [Pre-requisites](/docs/pre-requisites.md)
2. [Validator instructions](/docs/validator_instructions.md)
5 changes: 0 additions & 5 deletions docker-compose.production.yml

This file was deleted.

32 changes: 30 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,33 @@ services:
context: ./
volumes:
- ./data:/opt/inferno/data
- ./lib/au_core_test_kit:/opt/inferno/lib/au_core_test_kit
depends_on:
- validator-service
validator-service:
condition: service_started
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno
POSTGRES_USER: postgres
worker:
build:
context: ./
volumes:
- ./data:/opt/inferno/data
command: bundle exec sidekiq -r ./worker.rb
depends_on:
- redis
redis:
condition: service_started
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno
POSTGRES_USER: postgres
validator-service:
extends:
file: docker-compose.background.yml
Expand All @@ -33,3 +50,14 @@ services:
extends:
file: docker-compose.background.yml
service: redis
postgres:
image: postgres:16.2-alpine3.19
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno
3 changes: 0 additions & 3 deletions run.sh

This file was deleted.

4 changes: 0 additions & 4 deletions setup.sh

This file was deleted.

Loading