docker-compose.yml
version: "3.8"
x-env-aliases:
- &DEFAULT_BUILD_ARGS
PHP_TAG: "${PHP_VERSION:-8.0}-cli-alpine${ALPINE_VERSION:-3.16}"
PHP_API_VERSION: "${PHP_API_VERSION:-20200930}"
COMPOSER_ARGS: "${COMPOSER_ARGS:-install}"
COMPOSER_AUTH: "${COMPOSER_AUTH:-}"
SWOOLE_VERSION: "${SWOOLE_VERSION:-4.12.1}"
COMPOSER_TAG: "${COMPOSER_TAG:-2.5.2}"
XDEBUG_TAG: "${XDEBUG_TAG:-3.2.0}"
volumes:
coverage: {}
services:
releaser:
image: "docker.io/pixelfederation/release-version-script:latest"
environment:
DEBUG: "${DEBUG:-0}"
DRY_RUN: "${DRY_RUN:-1}"
GH_REPOSITORY: "${GH_REPOSITORY:-pixelfederation/swoole-bundle}"
GH_COMMITER_NAME: "${GH_COMMITER_NAME:-pf-releaser-bot}"
GH_COMMITER_EMAIL: "${GH_COMMITER_EMAIL:-mfris2011@gmail.com}"
GH_TOKEN: "${GH_TOKEN:-xxxxxxxx}"
GH_RELEASE_DRAFT: "${GH_RELEASE_DRAFT:-false}"
GH_RELEASE_PRERELEASE: "${GH_RELEASE_PRERELEASE:-false}"
volumes:
- "./.git:/usr/src/app/.git:rw"
- "./CHANGELOG.md:/usr/src/app/CHANGELOG.md:rw"
cli:
image: "${REGISTRY:-docker.io}/${NAMESPACE:-pixelfederation}/${IMAGE:-swoole-bundle}-cli:${TAG:-local}"
container_name: swoole-bundle-cli
build:
context: .
target: cli
args:
<<: *DEFAULT_BUILD_ARGS
environment:
DATABASE_HOST: 'db'
ports:
- 9501:9501
composer:
image: "${REGISTRY:-docker.io}/${NAMESPACE:-pixelfederation}/${IMAGE:-swoole-bundle}-composer:${TAG:-local}"
build:
context: .
target: Composer
args:
<<: *DEFAULT_BUILD_ARGS
environment:
DATABASE_HOST: 'db'
coverage-xdebug:
image: "${REGISTRY:-docker.io}/${NAMESPACE:-pixelfederation}/${IMAGE:-swoole-bundle}-coverage-xdebug:${TAG:-local}"
build:
context: .
target: CoverageXdebug
args:
<<: *DEFAULT_BUILD_ARGS
environment:
DATABASE_HOST: 'db'
volumes:
- coverage:/usr/src/app/cov
coverage-pcov:
image: "${REGISTRY:-docker.io}/${NAMESPACE:-pixelfederation}/${IMAGE:-swoole-bundle}-coverage-pcov:${TAG:-local}"
build:
context: .
target: CoveragePcov
args:
<<: *DEFAULT_BUILD_ARGS
environment:
DATABASE_HOST: 'db'
volumes:
- coverage:/usr/src/app/cov
coverage-xdebug-feature-with-retry:
image: "${REGISTRY:-docker.io}/${NAMESPACE:-pixelfederation}/${IMAGE:-swoole-bundle}-coverage-xdebug:${TAG:-local}"
entrypoint:
- /bin/bash
command:
- tests/run-feature-tests-code-coverage.sh
build:
context: .
target: CoverageXdebug
args:
<<: *DEFAULT_BUILD_ARGS
environment:
DATABASE_HOST: 'db'
volumes:
- coverage:/usr/src/app/cov
merge-code-coverage:
image: "${REGISTRY:-docker.io}/${NAMESPACE:-pixelfederation}/${IMAGE:-swoole-bundle}-merge-code-coverage:${TAG:-local}"
command: merge-code-coverage
build:
context: .
target: MergeCodeCoverage
args:
<<: *DEFAULT_BUILD_ARGS
volumes:
- coverage:/usr/src/app/cov
coverage-volume-helper:
image: "alpine:${ALPINE_VERSION:-3.16}"
entrypoint: sleep
command: infinity
working_dir: /usr/src/app
volumes:
- coverage:/usr/src/app/cov
db:
container_name: swoole-bundle-db
image: mysql:8
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: pass
MYSQL_DATABASE: db