Skip to content

Commit

Permalink
Creation of a Developer Environment (#280)
Browse files Browse the repository at this point in the history
* feat(docker compose): adding a environment for development.

* chore(docker compose): changing the project's path.

* fix(dockerfile): adding extension for skipped test.

* fix(github actions): updating php version and setting rabbitmq version to 3.8.
  • Loading branch information
TarsisioXavier authored Aug 7, 2022
1 parent 1ddd390 commit cf190b6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM php:8.1-fpm-alpine

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN apk --no-cache --update add libmemcached-dev zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev libxml2-dev

RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd sockets fileinfo dom xml simplexml pcntl

RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: '3.3'
services:
pigeon:
container_name: pigeon
build: .
working_dir: /var/www/package
volumes:
- .:/var/www/package
networks:
pigeon-network:
ipv4_address: 172.40.10.30
aliases:
- rabbitmq

rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.8
hostname: rabbitmq
networks:
pigeon-network:
ipv4_address: 172.40.10.20
aliases:
- rabbitmq

networks:
pigeon-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.40.10.0/24
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<env name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<env name="PIGEON_DRIVER" value="rabbit"/>
<env name="PIGEON_ADDRESS" value="localhost"/>
<env name="PIGEON_ADDRESS" value="rabbitmq"/>
<env name="PIGEON_PORT" value="5672"/>
<env name="PIGEON_USER" value="guest"/>
<env name="PIGEON_PASSWORD" value="guest"/>
Expand Down

0 comments on commit cf190b6

Please sign in to comment.