Skip to content

Commit

Permalink
Update for doctrine
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Sep 7, 2022
1 parent ea3663b commit 90be698
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ COPY bin/doctrine/proxies.sh /usr/local/bin/doctrine-proxies.sh
RUN cd /var/www && composer install --no-dev

# Set the correct permissions
RUN chown -R www-data:www-data /var/www/ && chmod -R 777 /tmp && chmod 755 /usr/local/bin/doctrine-proxies.sh
RUN chown -R www-data:www-data /var/www/ && chmod 755 /usr/local/bin/doctrine-proxies.sh

CMD ["/usr/local/bin/doctrine-proxies.sh"]
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ docker-compose up

This will bring up several containers:

1. quran-app - This is the actual PHP / Apache instance. This runs on https://localhost:7070 - see https://localhost:7070/ayah/1.
2. quran-db - This is the Percona DB Container.
3. quran-memcached - This is the Memcached Container.
4. quran-pma - PHPMYAdmin to acccess your Percona DB. This runs on https://localhost:7071. The default username and password are both 'quran' and 'quran'.
5. quran-memadmin - PHPMemcachedAdmin to access your Memcached container. This runs on https://localhost:7072. The default username and password are both 'quran'
1. api - This is the actual PHP / Apache instance. This runs on https://localhost - see https://localhost/v1/ayah/1.
2. mysql - This is the Percona DB Container.
3. memcached - This is the Memcached Container.

#### Build and Contribute

Expand Down
2 changes: 1 addition & 1 deletion bin/doctrine/proxies.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Generate Doctrine ORM proxies
cd /var/www && vendor/bin/doctrine orm:generate-proxies
cd /var/www && vendor/bin/doctrine orm:generate-proxies --em primary

# Start apache
apache2-foreground
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "template",
"require": {
"doctrine/annotations": "^1.13",
"mamluk/kipchak": "0.11"
"mamluk/kipchak": "0.12"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/kipchak.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
'name' => 'alquran-api', // Hyphen or underscore separated string
'debug' => (bool) env('DEBUG', false),
// If debug is enabled, loglevel is debug. Otherwise, it is info. Overwrite it by specifying it below.
// 'loglevel' => \Monolog\Level::Debug
'loglevel' => \Monolog\Level::Debug
];
4 changes: 2 additions & 2 deletions config/kipchak.doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'connection' => 'primary', // Name of connection from 'dbal' above to use for the ORM
'cache' => [
'enabled' => true, // Kipchak will only look at this if dev_mode = false
'store' => 'memcached', // file or memcached.
'store' => 'file', // file or memcached.
],
'cache_config' => [
'memcached' => [
Expand All @@ -47,7 +47,7 @@
],
'file' => [
// Path where Doctrine will cache the processed metadata when 'dev_mode' is false
'dir' => '/tmp',
'dir' => realpath(__DIR__) . '/../tmp/doctrine/cache',
]
]
],
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- memcached
- mysql
environment:
DEBUG: "true" # Any value will make it true. For false, remove the variable.
# DEBUG: "true" # Any value will make it true. For false, remove the variable.
DB_USER: "api"
DB_PASSWORD: "api"
DB_NAME: "api"
Expand Down

0 comments on commit 90be698

Please sign in to comment.