Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Update docker dev tools #44

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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