Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/11.0' into pr/175
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Dec 11, 2023
2 parents 2fcffcb + 1dabc30 commit 30ab75a
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 19 deletions.
5 changes: 1 addition & 4 deletions .docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

# mime types are already covered in nginx.conf
#include mime.types;
types {
image/avif avif;
}

upstream php-pimcore10 {
server php:9000;
Expand Down Expand Up @@ -105,7 +102,7 @@ server {

# Assets
# Still use a whitelist approach to prevent each and every missing asset to go through the PHP Engine.
location ~* ^(?!/admin)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|zip|mp\d|m4a|ogg|ogv|webm|pdf|docx?|xlsx?|pptx?)$ {
location ~* ^(?!/admin|/asset/webdav)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|zip|mp\d|m4a|ogg|ogv|webp|webm|pdf|docx?|xlsx?|pptx?)$ {
try_files /var/assets$uri $uri =404;
expires 2w;
access_log off;
Expand Down
2 changes: 1 addition & 1 deletion .docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stdout_logfile_maxbytes=0
redirect_stderr=true

[program:maintenance]
command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance --async'
command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance'
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pimcore-skeleton.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
cd sample-project/
# Set up docker-compose.yaml to use current user's uid:gid, just like README.md suggests.
sed -i "s|#user: '1000:1000'|user: '$(id -u):$(id -g)'|g" docker-compose.yaml
# Start containers
docker compose pull --quiet
docker compose up -d
Expand All @@ -87,5 +90,6 @@ jobs:
cd sample-project/
# Set up and execute codeception tests, just like README.md suggests.
docker compose run --user=root --rm test-php chown -R $(id -u):$(id -g) var/ public/var/
docker compose run --rm -T test-php vendor/bin/pimcore-install -n
docker compose run --rm -T test-php vendor/bin/codecept run -vv
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

!/var/config
/var/config/system.yml
/var/config/debug-mode.php
/var/config/maintenance.php

# project specific recommendations
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cd ./my-project
You can also use Docker to set up a new Pimcore Installation.
You don't need to have a PHP environment with composer installed.

### Prerequisits
### Prerequisites

* Your user must be allowed to run docker commands (directly or via sudo).
* You must have docker compose installed.
Expand All @@ -33,8 +33,7 @@ You don't need to have a PHP environment with composer installed.
`cd my-project/`

3. Part of the new project is a docker compose file
* Run `` echo `id -u`:`id -g` `` to retrieve your local user and group id
* Open the `docker-compose.yaml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary
* Run `sed -i "s|#user: '1000:1000'|user: '$(id -u):$(id -g)'|g" docker-compose.yaml` to set the correct user id and group id.
* Start the needed services with `docker compose up -d`

4. Install pimcore and initialize the DB
Expand All @@ -44,6 +43,7 @@ You don't need to have a PHP environment with composer installed.
* If you select to install the SimpleBackendSearchBundle please make sure to add the `pimcore_search_backend_message` to your `.docker/supervisord.conf` file.

5. Run codeception tests:
* `docker compose run --user=root --rm test-php chown -R $(id -u):$(id -g) var/ public/var/`
* `docker compose run --rm test-php vendor/bin/pimcore-install -n`
* `docker compose run --rm test-php vendor/bin/codecept run -vv`

Expand Down
60 changes: 60 additions & 0 deletions composer.enterprise.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "pimcore/skeleton",
"type": "project",
"license": "GPL-3.0-or-later",
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"process-timeout": 0,
"allow-plugins": {
"symfony/runtime": true
}
},
"prefer-stable": true,
"require": {
"pimcore/pimcore": "^11.0",
"pimcore/admin-ui-classic-bundle": "^1.0",
"pimcore/platform-version": "^2023.1",
"symfony/runtime": "^6.2",
"symfony/dotenv": "^6.2"
},
"require-dev": {
"codeception/codeception": "^5.0.3",
"codeception/module-symfony": "^3.1.0"
},
"suggest": {
"pimcore/data-hub": "Universal data interface for GraphQL, CSV and other formats"
},
"autoload": {
"psr-4": {
"App\\": "src/",
"Pimcore\\Model\\DataObject\\": "var/classes/DataObject"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"scripts": {
"post-create-project-cmd": "Pimcore\\Composer::postCreateProject",
"post-install-cmd": [
"Pimcore\\Composer::postInstall",
"@pimcore-scripts"
],
"post-update-cmd": [
"Pimcore\\Composer::postUpdate",
"@pimcore-scripts"
],
"pimcore-scripts": [
"Pimcore\\Composer::clearCache",
"Pimcore\\Composer::installAssets"
]
},
"repositories": {
"enterprise": {
"type": "composer",
"url": "https://enterprise.repo.pimcore.com/"
}
}
}
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"pimcore/pimcore": "^11.0",
"pimcore/pimcore": "^11.0.4",
"pimcore/admin-ui-classic-bundle": "^1.0",
"symfony/runtime": "^6.2",
"symfony/dotenv": "^6.2"
},
"conflict": {
"pimcore/pimcore": "v11.0.0-ALPHA1 || v11.0.0-ALPHA2 || v11.0.0-ALPHA3 || v11.0.0-ALPHA4 || v11.0.0-ALPHA5 || v11.0.0-ALPHA6 || v11.0.0-ALPHA7 || v11.0.0-ALPHA8 || v11.0.0-BETA1 || v11.0.0-RC1",
"pimcore/admin-ui-classic-bundle": "v1.0.0-BETA1"
},
"require-dev": {
"codeception/codeception": "^5.0.3",
"codeception/module-symfony": "^3.1.0"
Expand Down
3 changes: 1 addition & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ framework:
# pools:
# pimcore.cache.pool:
# public: true
# tags: true
# default_lifetime: 31536000 # 1 year
# adapter: pimcore.cache.adapter.redis_tag_aware
# adapter: cache.adapter.redis_tag_aware
# provider: 'redis://localhost' # Redis DNS, see: https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection

#### USE SESSION HANDLER CONFIGURED IN php.ini
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:

php:
#user: '1000:1000' # set to your uid:gid
image: pimcore/pimcore:php8.2-debug-v2-dev
image: pimcore/pimcore:php8.2-debug-latest
environment:
COMPOSER_HOME: /var/www/html
PHP_IDE_CONFIG: serverName=localhost
Expand All @@ -55,7 +55,7 @@ services:

supervisord:
#user: '1000:1000' # set to your uid:gid
image: pimcore/pimcore:php8.2-supervisord-v2-dev
image: pimcore/pimcore:php8.2-supervisord-latest
depends_on:
db:
condition: service_healthy
Expand Down

0 comments on commit 30ab75a

Please sign in to comment.