Skip to content
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
5 changes: 5 additions & 0 deletions .dclintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-duplicate-exported-ports": 0
}
}
23 changes: 23 additions & 0 deletions .github/workflows/composer-normalize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Composer Normalize

on:
push:
branches:
- main
paths:
- composer.json
- .github/workflows/composer-normalize.yml
pull_request:
branches:
- main
paths:
- composer.json
- .github/workflows/composer-normalize.yml

jobs:
composer-normalize:
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Normalize composer.json (check)
run: composer normalize --dry-run
php-version: '8.2'
9 changes: 9 additions & 0 deletions .github/workflows/conventional-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Conventional PR Title

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
conventional-pr-title:
uses: openCoreEMR/github-workflows-public/.github/workflows/conventional-pr-title.yml@0.0.4
25 changes: 25 additions & 0 deletions .github/workflows/dclint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: dclint

on:
push:
branches:
- main
paths:
- '**/compose.yml'
- '**/compose.yaml'
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- .github/workflows/dclint.yml
pull_request:
branches:
- main
paths:
- '**/compose.yml'
- '**/compose.yaml'
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- .github/workflows/dclint.yml

jobs:
dclint:
uses: openCoreEMR/github-workflows-public/.github/workflows/dclint.yml@0.0.4
72 changes: 46 additions & 26 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,98 @@
# OpenEMR CLI Import Codes - Development Environment
#
# Extends OpenEMR's development-easy services with overrides:
# - Random ports instead of fixed (8300, 9300, etc.)
# - Random ports bound to 127.0.0.1 (avoid conflicts; never expose dev DB to LAN)
# - CLI tool mounted into OpenEMR container
# - PHPUnit services available via profiles

name: oce-cli-import-codes

services:
openemr:
couchdb:
ports: !override
- target: 5984
host_ip: 127.0.0.1
protocol: tcp
mode: host
- target: 6984
host_ip: 127.0.0.1
protocol: tcp
mode: host
extends:
file: vendor/openemr/openemr/docker/development-easy/docker-compose.yml
service: openemr
service: couchdb

mysql:
ports: !override
- "80"
- "443"
- target: 3306
host_ip: 127.0.0.1
protocol: tcp
mode: host
extends:
file: vendor/openemr/openemr/docker/development-easy/docker-compose.yml
service: mysql

openemr:
volumes:
- .:/var/www/localhost/htdocs/openemr/oce-cli-import-codes:rw
ports: !override
- target: 80
host_ip: 127.0.0.1
protocol: tcp
mode: host
- target: 443
host_ip: 127.0.0.1
protocol: tcp
mode: host
healthcheck:
test: ["CMD", "curl", "-fsk", "https://localhost:443/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 3m

mysql:
extends:
file: vendor/openemr/openemr/docker/development-easy/docker-compose.yml
service: mysql
ports: !override
- "3306"
service: openemr

phpmyadmin:
openldap:
extends:
file: vendor/openemr/openemr/docker/development-easy/docker-compose.yml
service: phpmyadmin
ports: !override
- "80"
service: openldap

couchdb:
extends:
file: vendor/openemr/openemr/docker/development-easy/docker-compose.yml
service: couchdb
phpmyadmin:
ports: !override
- "5984"
- "6984"

openldap:
- target: 80
host_ip: 127.0.0.1
protocol: tcp
mode: host
extends:
file: vendor/openemr/openemr/docker/development-easy/docker-compose.yml
service: openldap
service: phpmyadmin

# PHPUnit test runner
phpunit:
profiles: [test]
build:
context: .
dockerfile: Dockerfile.test
volumes:
- .:/app
- /app/vendor
command: vendor/bin/phpunit --testdox
profiles: [test]

# PHPUnit with coverage
phpunit-coverage:
profiles: [test]
build:
context: .
dockerfile: Dockerfile.test
volumes:
- .:/app
- /app/vendor
- ./htmlcov:/app/htmlcov
command: vendor/bin/phpunit --coverage-html htmlcov --coverage-text
environment:
XDEBUG_MODE: coverage
command: vendor/bin/phpunit --coverage-html htmlcov --coverage-text
profiles: [test]

volumes:
databasevolume: {}
Expand Down