Skip to content

Commit 4a32d1f

Browse files
Merge pull request #261 from utmsigep/docker-support
Add basic Docker support
2 parents f50d5e9 + 7fa25f9 commit 4a32d1f

5 files changed

Lines changed: 53 additions & 47 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
env:
1212
MYSQL_ALLOW_EMPTY_PASSWORD: false
1313
MYSQL_ROOT_PASSWORD: symfony
14-
MYSQL_DATABASE: symfony
14+
MYSQL_DATABASE: symfony_test
1515
ports:
1616
- 3306/tcp
1717
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
@@ -67,7 +67,7 @@ jobs:
6767
php bin/console doctrine:migrations:migrate -n
6868
php bin/console doctrine:fixtures:load -n
6969
env:
70-
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
70+
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony_test
7171

7272
- name: Run Validators
7373
run: |
@@ -76,7 +76,7 @@ jobs:
7676
php bin/console lint:xliff translations
7777
php bin/console doctrine:schema:validate -vvv --no-interaction
7878
env:
79-
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
79+
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony_test
8080

8181
- name: Run PHPUnit
8282
run: bin/phpunit --coverage-clover build/coverage-${{ matrix.php-versions }}.xml --log-junit build/phpunit-${{ matrix.php-versions }}.xml

composer.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/packages/prod/doctrine.yaml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
doctrine:
22
orm:
33
auto_generate_proxy_classes: false
4-
metadata_cache_driver:
5-
type: service
6-
id: doctrine.system_cache_provider
74
query_cache_driver:
8-
type: service
9-
id: doctrine.system_cache_provider
5+
type: pool
6+
pool: doctrine.system_cache_pool
107
result_cache_driver:
11-
type: service
12-
id: doctrine.result_cache_provider
13-
14-
services:
15-
doctrine.result_cache_provider:
16-
class: Symfony\Component\Cache\DoctrineProvider
17-
public: false
18-
arguments:
19-
- '@doctrine.result_cache_pool'
20-
doctrine.system_cache_provider:
21-
class: Symfony\Component\Cache\DoctrineProvider
22-
public: false
23-
arguments:
24-
- '@doctrine.system_cache_pool'
8+
type: pool
9+
pool: doctrine.result_cache_pool
2510

2611
framework:
2712
cache:

config/packages/test/doctrine.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
doctrine:
2+
dbal:
3+
# "TEST_TOKEN" is typically set by ParaTest
4+
dbname_suffix: '_test%env(default::TEST_TOKEN)%'

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: '2'
2+
services:
3+
database:
4+
environment:
5+
MYSQL_DATABASE: member_directory
6+
MYSQL_ALLOW_EMPTY_PASSWORD: 1
7+
image: mysql:5.7
8+
ports: [3306]
9+
volumes:
10+
- member-directory-mysql-data:/var/lib/mysql
11+
12+
mailer:
13+
image: 'schickling/mailcatcher'
14+
ports: [1025, 1080]
15+
16+
volumes:
17+
member-directory-mysql-data:

0 commit comments

Comments
 (0)