Skip to content

Commit

Permalink
Merge pull request #211 from silinternational/feature/misc
Browse files Browse the repository at this point in the history
development and test adjustments
  • Loading branch information
briskt authored Jun 4, 2024
2 parents 352ef44 + b44307e commit 339e387
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: test
run: docker-compose -f actions-services.yml run --rm app ./run-tests.sh
run: docker-compose -f actions-services.yml run --rm test ./run-tests.sh
- name: check hub metadata for tests
run: docker-compose -f actions-services.yml run --rm ssp-hub.local ./run-metadata-tests.sh
- name: check idp metadata for tests
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ RUN curl https://raw.githubusercontent.com/silinternational/s3-expand/1.5/s3-exp
WORKDIR /data

# Install/cleanup composer dependencies
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts --no-progress"
COPY composer.json /data/
COPY composer.lock /data/
RUN composer self-update --no-interaction
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts --no-progress
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install $COMPOSER_FLAGS

ENV SSP_PATH /data/vendor/simplesamlphp/simplesamlphp

Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ will overwrite variables set in the execution environment.
4. `make` or `docker-compose up -d` within the project root.
5. Visit http://ssp-hub.local to see SimpleSAMLphp

### Configure a container for debugging with Xdebug

1. Add a volume map for run-debug.sh on the container you wish to debug.

```yml
- ./development/run-debug.sh:/data/run-debug.sh
```
2. Add or change the `command` for the container.

```yml
command: /data/run-debug.sh
```

3. Restart the container.

```shell
docker composer up -d ssp-hub.local
```

### Setup PhpStorm for remote debugging with Docker

1. Make sure you're running PhpStorm 2016.3 or later
Expand Down
7 changes: 5 additions & 2 deletions actions-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ services:
MYSQL_USER: silauth
MYSQL_PASSWORD: silauth

app:
build: .
test:
build:
context: .
args:
COMPOSER_FLAGS: "--no-interaction --no-progress"
depends_on:
- ssp-hub.local
- ssp-idp1.local
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ services:
PMA_PASSWORD: silauth

test:
build: .
build:
context: .
args:
COMPOSER_FLAGS: "--no-interaction --no-progress"
depends_on:
- ssp-hub.local
- ssp-idp1.local
Expand Down Expand Up @@ -104,9 +107,6 @@ services:
- ./development/hub/metadata/saml20-sp-hosted.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-sp-hosted.php
- ./development/hub/metadata/sp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/sp-remote.php

# Configure the debugger
- ./development/hub/run-debug.sh:/data/run-debug.sh

# Enable checking our test metadata
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh

Expand All @@ -117,7 +117,6 @@ services:
- ./modules/silauth:/data/vendor/simplesamlphp/simplesamlphp/modules/silauth
- ./modules/sildisco:/data/vendor/simplesamlphp/simplesamlphp/modules/sildisco
- ./modules/material:/data/vendor/simplesamlphp/simplesamlphp/modules/material
command: /data/run-debug.sh
ports:
- "80:80"
environment:
Expand Down
1 change: 0 additions & 1 deletion dockerbuild/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -x
set -e

cd /data
export COMPOSER_ALLOW_SUPERUSER=1; composer install

whenavail "ssp-hub.local" 80 15 echo Hub ready
whenavail "ssp-idp1.local" 80 5 echo IDP 1 ready
Expand Down

0 comments on commit 339e387

Please sign in to comment.