Skip to content

Commit 4afd001

Browse files
authored
Add support Couchbase and MongoDB for PHP 8.3,8.4 (#48)
1 parent ec3afe1 commit 4afd001

File tree

8 files changed

+264
-0
lines changed

8 files changed

+264
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: php-8.3-couch-mongo-publish
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: ./.github/actions/docker-publish
14+
name: Build and Publish (8.3)
15+
with:
16+
version: 8.3
17+
docker-username: ${{ secrets.DOCKER_USERNAME }}
18+
docker-password: ${{ secrets.DOCKER_TOKEN }}
19+
20+
validate:
21+
runs-on: ubuntu-latest
22+
needs: publish
23+
container:
24+
image: kirschbaumdevelopment/laravel-test-runner:8.3-couch-mongo
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- run: |
29+
curl -fsSL https://goss.rocks/install | GOSS_VER=v${GOSS_VERSION} sh
30+
goss --gossfile 8.3-couch-mongo/goss.yaml validate
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: php-8.4-couch-mongo-publish
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: ./.github/actions/docker-publish
14+
name: Build and Publish (8.4)
15+
with:
16+
version: 8.4
17+
docker-username: ${{ secrets.DOCKER_USERNAME }}
18+
docker-password: ${{ secrets.DOCKER_TOKEN }}
19+
20+
validate:
21+
runs-on: ubuntu-latest
22+
needs: publish
23+
container:
24+
image: kirschbaumdevelopment/laravel-test-runner:8.4-couch-mongo
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- run: |
29+
curl -fsSL https://goss.rocks/install | GOSS_VER=v${GOSS_VERSION} sh
30+
goss --gossfile 8.4-couch-mongo/goss.yaml validate

8.3-couch-mongo/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM kirschbaumdevelopment/laravel-test-runner:8.3
2+
3+
ENV PHP_VERSION="8.4"
4+
ENV MONGODB_VERSION="2.0.0"
5+
ENV COUCHBASE_VERSION="3.2.2"
6+
7+
# Install system dependencies for couchbase
8+
RUN apt-get install -y wget
9+
RUN wget -O - https://packages.couchbase.com/clients/c/repos/deb/couchbase.key | apt-key add -
10+
RUN echo "deb https://packages.couchbase.com/clients/c/repos/deb/ubuntu1804 bionic bionic/main" | tee /etc/apt/sources.list.d/couchbase.list
11+
RUN apt-get update
12+
RUN apt-get install -y libcouchbase3 libcouchbase-dev
13+
14+
## Install PECL
15+
RUN apt-get install -y php-pear php${PHP_VERSION}-dev php${PHP_VERSION}-xml
16+
### Making sure we're using the correct php version
17+
RUN rm /etc/alternatives/php
18+
RUN ln -s /usr/bin/php${PHP_VERSION} /etc/alternatives/php
19+
20+
21+
## MongoDB
22+
RUN pecl install mongodb-${MONGODB_VERSION}
23+
RUN echo "extension=mongodb.so" | tee -a /etc/php/${PHP_VERSION}/cli/conf.d/20-mongodb.ini
24+
25+
26+
## Couchbase
27+
RUN pecl install couchbase-${COUCHBASE_VERSION}
28+
RUN echo "extension=couchbase.so" | tee -a /etc/php/${PHP_VERSION}/cli/conf.d/30-couchbase.ini

8.3-couch-mongo/goss.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
command:
2+
node --version:
3+
exit-status: 0
4+
stdout:
5+
- "v20"
6+
yarn --version:
7+
exit-status: 0
8+
npm --version:
9+
exit-status: 0
10+
stdout:
11+
- "10"
12+
git --version:
13+
exit-status: 0
14+
composer --version:
15+
exit-status: 0
16+
php --version:
17+
exit-status: 0
18+
stdout:
19+
- 8.3
20+
php -m:
21+
exit-status: 0
22+
stdout:
23+
- bcmath
24+
- calendar
25+
- exif
26+
- gd
27+
- iconv
28+
- imap
29+
- intl
30+
- ldap
31+
- mbstring
32+
- mysqli
33+
- pcntl
34+
- pdo_mysql
35+
- pdo_pgsql
36+
- pgsql
37+
- soap
38+
- xml
39+
- zip
40+
- mongodb
41+
- couchbase

8.3-couch-mongo/readme.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Canvas Test Runner
2+
3+
Docker Container with PHP and extensions to be compatible with most Laravel applications. Also installed on this container we have Composer and NodeJS/NPM/Yarn.
4+
5+
## Building and pushing the image
6+
7+
**Build**:
8+
9+
```
10+
docker build --pull -t kirschbaumdevelopment/laravel-test-runner .
11+
```
12+
13+
**Tag**:
14+
15+
```
16+
docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo
17+
```
18+
19+
**Login**
20+
```
21+
docker login --username=yourhubusername [email protected]
22+
```
23+
24+
25+
**Push**:
26+
27+
```
28+
docker push kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo
29+
```
30+
31+
## Credits
32+
33+
- [Luis Dalmolin](https://github.com/luisdalmolin)

8.4-couch-mongo/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM kirschbaumdevelopment/laravel-test-runner:8.4
2+
3+
ENV PHP_VERSION="8.4"
4+
ENV MONGODB_VERSION="2.0.0"
5+
ENV COUCHBASE_VERSION="3.2.2"
6+
7+
# Install system dependencies for couchbase
8+
RUN apt-get install -y wget
9+
RUN wget -O - https://packages.couchbase.com/clients/c/repos/deb/couchbase.key | apt-key add -
10+
RUN echo "deb https://packages.couchbase.com/clients/c/repos/deb/ubuntu1804 bionic bionic/main" | tee /etc/apt/sources.list.d/couchbase.list
11+
RUN apt-get update
12+
RUN apt-get install -y libcouchbase3 libcouchbase-dev
13+
14+
## Install PECL
15+
RUN apt-get install -y php-pear php${PHP_VERSION}-dev php${PHP_VERSION}-xml
16+
### Making sure we're using the correct php version
17+
RUN rm /etc/alternatives/php
18+
RUN ln -s /usr/bin/php${PHP_VERSION} /etc/alternatives/php
19+
20+
21+
## MongoDB
22+
RUN pecl install mongodb-${MONGODB_VERSION}
23+
RUN echo "extension=mongodb.so" | tee -a /etc/php/${PHP_VERSION}/cli/conf.d/20-mongodb.ini
24+
25+
26+
## Couchbase
27+
RUN pecl install couchbase-${COUCHBASE_VERSION}
28+
RUN echo "extension=couchbase.so" | tee -a /etc/php/${PHP_VERSION}/cli/conf.d/30-couchbase.ini

8.4-couch-mongo/goss.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
command:
2+
node --version:
3+
exit-status: 0
4+
stdout:
5+
- "v20"
6+
yarn --version:
7+
exit-status: 0
8+
npm --version:
9+
exit-status: 0
10+
stdout:
11+
- "10"
12+
git --version:
13+
exit-status: 0
14+
composer --version:
15+
exit-status: 0
16+
php --version:
17+
exit-status: 0
18+
stdout:
19+
- 8.3
20+
php -m:
21+
exit-status: 0
22+
stdout:
23+
- bcmath
24+
- calendar
25+
- exif
26+
- gd
27+
- iconv
28+
- imap
29+
- intl
30+
- ldap
31+
- mbstring
32+
- mysqli
33+
- pcntl
34+
- pdo_mysql
35+
- pdo_pgsql
36+
- pgsql
37+
- soap
38+
- xml
39+
- zip
40+
- mongodb
41+
- couchbase

8.4-couch-mongo/readme.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Canvas Test Runner
2+
3+
Docker Container with PHP and extensions to be compatible with most Laravel applications. Also installed on this container we have Composer and NodeJS/NPM/Yarn.
4+
5+
## Building and pushing the image
6+
7+
**Build**:
8+
9+
```
10+
docker build --pull -t kirschbaumdevelopment/laravel-test-runner .
11+
```
12+
13+
**Tag**:
14+
15+
```
16+
docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo
17+
```
18+
19+
**Login**
20+
```
21+
docker login --username=yourhubusername [email protected]
22+
```
23+
24+
25+
**Push**:
26+
27+
```
28+
docker push kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo
29+
```
30+
31+
## Credits
32+
33+
- [Luis Dalmolin](https://github.com/luisdalmolin)

0 commit comments

Comments
 (0)