version: "3.5"
services:
php:
image: yiisoftware/yii2-php:7.4-apache
volumes:
- ./tests/tmp/.composer:/root/.composer:rw
- .:/app
environment:
- TZ=UTC
- TIMEZONE=UTC
- DB_USER=dbuser
- DB_PASSWORD=dbpass
- IN_DOCKER=docker
- PHP_XDEBUG_ENABLED=1
- XDEBUG_CONFIG="remote_host=host.docker.internal"
- PHP_IDE_CONFIG="serverName=Docker"
depends_on:
- mysql
- postgres
tty: true
mysql:
image: mariadb
ports:
- '13306:3306'
tmpfs:
- /var/lib/mysql
environment:
TZ: UTC
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpass
MYSQL_DATABASE: testdb
MYSQL_INITDB_SKIP_TZINFO: 1
postgres:
image: postgres:12
ports:
- '15432:5432'
tmpfs:
- /var/lib/postgresql/data
environment:
TZ: UTC
PGTZ: UTC
POSTGRES_USER: dbuser
POSTGRES_PASSWORD: dbpass
POSTGRES_DB: testdb
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.14.0.0/24
|