-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from sven-ahrens/feature/add-docker-setup
[Feature]: Add docker setup and an updated README for people who want to contribute
- Loading branch information
Showing
8 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM php:8.3-fpm | ||
WORKDIR "/application" | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y --no-install-recommends install \ | ||
libpq-dev \ | ||
libsqlite3-dev \ | ||
unzip \ | ||
wget \ | ||
default-mysql-client \ | ||
&& docker-php-ext-install \ | ||
pdo_mysql \ | ||
pdo_pgsql \ | ||
pdo_sqlite \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | ||
|
||
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Contributing | ||
This is for people who want to contribute to the project. | ||
|
||
## How to get started | ||
|
||
First of all, you need to fork the repository and clone it locally. | ||
After that, we've prepared a docker setup to help you get started quickly. | ||
|
||
Install docker and docker-compose on your machine, then run the following commands: | ||
|
||
```bash | ||
docker-compose up --detach | ||
``` | ||
|
||
Install the dependencies with composer: | ||
|
||
```bash | ||
docker-compose exec php-fpm composer install | ||
``` | ||
|
||
Now you can execute the tests with the following command: | ||
|
||
```bash | ||
docker-compose exec php-fpm ./vendor/bin/phpunit --exclude-group "" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: '3.1' | ||
services: | ||
mariadb: | ||
image: 'mariadb:11.0' | ||
working_dir: /application | ||
volumes: | ||
- '.:/application' | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=root | ||
- MYSQL_DATABASE=acme | ||
ports: | ||
- '11003:3306' | ||
|
||
postgres: | ||
image: 'postgres:15-alpine' | ||
working_dir: /application | ||
volumes: | ||
- '.:/application' | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=postgres | ||
- POSTGRES_HOST=postgres | ||
ports: | ||
- '11004:5432' | ||
|
||
php-fpm: | ||
build: . | ||
working_dir: /application | ||
volumes: | ||
- '.:/application' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters