Skip to content

Commit

Permalink
Add PHP development image and update Dockerfile
Browse files Browse the repository at this point in the history
Introduced a new PHP development image and added necessary dependencies in the Dockerfile. The docker-compose file has also been renamed to compose.yml adding a new 'php-dev' service.
  • Loading branch information
nbejansen committed Jun 2, 2024
1 parent 0b1b3e1 commit d2e85ff
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/php-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: php-nginx

on:
push:
branches:
- '1.x'
paths:
- 'src/php-dev/**'
- 'src/Dockerfile'
- '.github/workflows/php-dev.yml'
workflow_dispatch:

jobs:
php-dev:
uses: ./.github/workflows/build.yml
strategy:
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
fail-fast: true
with:
target: php-dev
version: ${{ matrix.php }}
secrets: inherit
13 changes: 13 additions & 0 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@ services:
build:
context: ./src
target: php-ols

php-dev:
image: ghcr.io/sitepilot/php-dev:8.3
profiles:
- donotstart
ports:
- :80
- :443
environment:
RUNTIME_VERBOSITY: 2
build:
context: ./src
target: php-dev
10 changes: 10 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,13 @@ EXPOSE 443

HEALTHCHECK --interval=2s --timeout=1s --retries=5 \
CMD curl -f http://localhost/-/ping/ || exit 1

# --------------- [php-dev] --------------- #

FROM php-nginx AS php-dev

USER root

RUN /runtime/bin/install mysql-client ssh-client rsync nano \

USER $RUNTIME_UID

0 comments on commit d2e85ff

Please sign in to comment.