Skip to content

Instantly share code, notes, and snippets.

@faiyazalam
Last active March 25, 2023 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faiyazalam/544f9e6b8b16b86aae585de7a2f0de52 to your computer and use it in GitHub Desktop.
Save faiyazalam/544f9e6b8b16b86aae585de7a2f0de52 to your computer and use it in GitHub Desktop.
Sample docker file to create pimcore 10 instance with php ZMQ extension
services:
redis:
image: redis:alpine
command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ]
db:
image: mariadb:10.7
working_dir: /application
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1]
volumes:
- pimcore-database:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=ROOT
- MYSQL_DATABASE=pimcore
- MYSQL_USER=pimcore
- MYSQL_PASSWORD=pimcore
nginx:
image: nginx:stable-alpine
ports:
- "81:80"
volumes:
- .:/var/www/html:ro
- ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php-fpm
- php-fpm-debug
php-fpm:
user: '1000:1000' # set to your uid:gid
image: yournamespace/pimcore:1.0 # use the custome image for php-fpm service
environment:
COMPOSER_HOME: /var/www/html
ports:
- "8080:8080"
- "8089:8089"
depends_on:
- db
volumes:
- .:/var/www/html
- pimcore-tmp-storage:/tmp
php-fpm-debug:
user: '1000:1000' # set to your uid:gid
image: pimcore/pimcore:PHP8.1-fpm-debug
depends_on:
- db
volumes:
- .:/var/www/html
- pimcore-tmp-storage:/tmp
environment:
PHP_IDE_CONFIG: serverName=localhost
COMPOSER_HOME: /var/www/html
supervisord:
user: '1000:1000' # set to your uid:gid
image: pimcore/pimcore:PHP8.1-supervisord
depends_on:
- db
volumes:
- .:/var/www/html
- ./.docker/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
environment:
- discovery.type=single-node
ports:
- "9202:9200"
adminer:
image: adminer
restart: always
ports:
- "8081:8080"
volumes:
pimcore-database:
pimcore-tmp-storage:
FROM pimcore/pimcore:PHP8.1-fpm
RUN apt-get update
RUN apt-get install -y build-essential libtool autoconf uuid-dev pkg-config libsodium-dev libzmq3-dev
RUN git clone https://github.com/zeromq/php-zmq.git
RUN cd php-zmq && phpize && ./configure
RUN cd php-zmq && make && make install
RUN docker-php-ext-enable zmq
RUN cd /var/www/html/ && rm -rf php-zmq/
#create image by running this command on your terminal, make sure to give correct filepath for Dockerfile:
#docker build -t yournamespace/pimcore:1.0 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment