File tree 5 files changed +91
-0
lines changed
5 files changed +91
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ It means that composer will look at `master` branch of repository configured und
59
59
### 2023-10-19
60
60
61
61
- Removed usage of deprecated ` redis->getKeys() ` in favor of ` redis->keys() ` .
62
+ - Added docker-compose setup to run tests locally.
62
63
63
64
### 2023-09-18
64
65
Original file line number Diff line number Diff line change
1
+ services :
2
+ web :
3
+ build : ./docker/web
4
+ environment :
5
+ PHP_IDE_CONFIG : " serverName=localhost"
6
+ volumes :
7
+ - ./:/var/www/html:cached
8
+ working_dir : /var/www/html
9
+ ports :
10
+ - " 8000:80"
11
+ depends_on :
12
+ - mysql
13
+ - pgsql
14
+ - memcached
15
+ - redis
16
+ mysql :
17
+ image : mysql:5.6
18
+ platform : linux/amd64
19
+ command : mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
20
+ environment :
21
+ MYSQL_ROOT_PASSWORD : root
22
+ MYSQL_DATABASE : cakephp_test
23
+ MYSQL_USER : cakephp_test
24
+ MYSQL_PASSWORD : secret
25
+ volumes :
26
+ - ./docker/mysql:/docker-entrypoint-initdb.d:cached
27
+ - mysql-data:/var/lib/mysql
28
+ ports :
29
+ - " 3306:3306"
30
+ pgsql :
31
+ image : postgres:9.4
32
+ platform : linux/amd64
33
+ environment :
34
+ POSTGRES_DB : cakephp_test
35
+ POSTGRES_USER : postgres
36
+ POSTGRES_PASSWORD : postgres
37
+ volumes :
38
+ - ./docker/pgsql:/docker-entrypoint-initdb.d:cached
39
+ - pgsql-data:/var/lib/postgresql/data
40
+ ports :
41
+ - " 5432:5432"
42
+ memcached :
43
+ image : memcached:latest
44
+ hostname : memcached
45
+ ports :
46
+ - " 11211:11211"
47
+ redis :
48
+ image : " redis:latest"
49
+ hostname : redis
50
+ ports :
51
+ - " 6379:6379"
52
+ volumes :
53
+ mysql-data :
54
+ pgsql-data :
Original file line number Diff line number Diff line change
1
+ CREATE DATABASE IF NOT EXISTS cakephp_test ;
2
+ GRANT ALL ON cakephp_test.* TO ' cakephp_test' @' %' ;
3
+ CREATE DATABASE IF NOT EXISTS cakephp_test2 ;
4
+ GRANT ALL ON cakephp_test2.* TO ' cakephp_test' @' %' ;
5
+ CREATE DATABASE IF NOT EXISTS cakephp_test3 ;
6
+ GRANT ALL ON cakephp_test3.* TO ' cakephp_test' @' %' ;
7
+ FLUSH PRIVILEGES ;
Original file line number Diff line number Diff line change
1
+ \c cakephp_test
2
+
3
+ CREATE SCHEMA test2 ;
4
+ CREATE SCHEMA test3 ;
Original file line number Diff line number Diff line change
1
+ FROM php:8.2-apache
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ && apt-get install -y libpq-dev libzip-dev unzip openssl libmcrypt-dev libmemcached-dev locales \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ RUN docker-php-ext-install pdo_mysql pdo_pgsql zip \
8
+ && pecl install apcu redis memcached mcrypt xdebug \
9
+ && docker-php-ext-enable redis memcached mcrypt \
10
+ && docker-php-ext-enable xdebug \
11
+ && echo "extension=apcu.so" >> /usr/local/etc/php/php.ini \
12
+ && echo "apc.enable_cli = 1" >> /usr/local/etc/php/php.ini
13
+
14
+ COPY --from=composer /usr/bin/composer /usr/local/bin/composer
15
+
16
+ RUN sed -i '/de_DE /s/^# //g' /etc/locale.gen \
17
+ && sed -i '/es_ES /s/^# //g' /etc/locale.gen \
18
+ && locale-gen
19
+
20
+ ENV APACHE_DOCUMENT_ROOT /var/www/html/app/webroot
21
+
22
+ RUN a2enmod rewrite
23
+
24
+ RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
25
+ RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
You can’t perform that action at this time.
0 commit comments