Skip to content

Commit

Permalink
Merge pull request #44 from darkwood-fr/docker
Browse files Browse the repository at this point in the history
🔧 Update docker dev tools
  • Loading branch information
matyo91 authored Sep 7, 2023
2 parents 44d18cd + df18fc6 commit 19dcc3f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ A working script is available in the bundled `examples` directory
- Start Server : `php examples/server.php`
Start Client(s) : `php examples/client.php`

Messaging part require to install [Docker](https://www.docker.com) and execute `docker-compose up -d`

## Documentation

[https://darkwood-fr.github.io/flow](https://darkwood-fr.github.io/flow)
Expand Down
22 changes: 22 additions & 0 deletions tools/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# syntax=docker/dockerfile:1.6.0

FROM php:8.2-fpm-alpine as php

RUN apk add --update make curl

COPY --from=composer:2.6.2 /usr/bin/composer /usr/bin/composer
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN curl "https://github.com/jolicode/castor/releases/latest/download/castor.linux-amd64.phar" -Lso /usr/local/bin/castor && chmod u+x /usr/local/bin/castor

RUN set -eux; \
install-php-extensions \
apcu \
intl \
opcache \
zip \
openswoole \
;

WORKDIR /flow

CMD ["php-fpm"]
23 changes: 14 additions & 9 deletions tools/dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
version: '3'
services:
mysql:
image: mysql:8.1
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=flow
- MYSQL_USER=flow
- MYSQL_PASSWORD=flow
ports:
- 3306:3306
php:
image: flow-php
build:
context: .
target: php
volumes:
- ../..:/flow
mysql:
image: mysql:8.1
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=flow
- MYSQL_USER=flow
- MYSQL_PASSWORD=flow

0 comments on commit 19dcc3f

Please sign in to comment.