Skip to content

Commit

Permalink
docker-compose: use new docker tags (#369)
Browse files Browse the repository at this point in the history
* docker-compose: use new docker tags

* docker-compose: use new docker tags

* readme
  • Loading branch information
brusch committed Oct 27, 2022
1 parent b9c605a commit 4a6d78d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ types {
}

upstream php-pimcore10 {
server php-fpm:9000;
server php:9000;
}

map $args $static_page_root {
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pimcore-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ jobs:
docker-compose pull --quiet
docker-compose up -d
# Install dockerize into the php-fpm container. We need it to block until
# Install dockerize into the php container. We need it to block until
# database is ready to serve connections.
docker-compose exec -T -- php-fpm bash -c '\
docker-compose exec -T -- php bash -c '\
curl -sfL https://github.com/powerman/dockerize/releases/download/v0.11.5/dockerize-`uname -s`-`uname -m` \
| install /dev/stdin /usr/local/bin/dockerize'
# Wait for the database to set up.
docker-compose exec -T -- php-fpm dockerize -wait tcp://db:3306 -timeout 5m
docker-compose exec -T -- php dockerize -wait tcp://db:3306 -timeout 5m
# Run pimcore installation.
docker-compose exec -T \
Expand All @@ -88,4 +88,4 @@ jobs:
-e PIMCORE_INSTALL_MYSQL_USERNAME=pimcore \
-e PIMCORE_INSTALL_MYSQL_PASSWORD=pimcore \
-- \
php-fpm vendor/bin/pimcore-install -n --mysql-host-socket=db --mysql-database=pimcore
php vendor/bin/pimcore-install -n --mysql-host-socket=db --mysql-database=pimcore
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ You don't need to have a PHP environment with composer installed.
### Follow these steps

1. Initialize the demo project using the `pimcore/pimcore` image
``docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:PHP8.0-fpm composer create-project pimcore/demo my-project``
``docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.1-latest composer create-project pimcore/demo my-project``
1. Go to your new project
`cd my-project/`
1. 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.yml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary
* Start the needed services with `docker-compose up -d`
1. Install pimcore and initialize the DB
`docker-compose exec php-fpm vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore`
`docker-compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore`
* When asked for admin user and password: Choose freely
* This can take a while, up to 20 minutes
1. :heavy_check_mark: DONE - You can now visit your pimcore-demo:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
db:
image: mariadb:10.7
working_dir: /application
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1]
command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1 ]
volumes:
- pimcore-demo-database:/var/lib/mysql
environment:
Expand All @@ -23,11 +23,11 @@ services:
- .:/var/www/html:ro
- ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php-fpm
- php

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

supervisord:
#user: '1000:1000' # set to your uid:gid
image: pimcore/pimcore:PHP8.1-supervisord
image: pimcore/pimcore:php8.1-supervisord-latest
depends_on:
- db
volumes:
Expand Down

0 comments on commit 4a6d78d

Please sign in to comment.