Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Helper commands

Pieter Meyvaert edited this page Mar 7, 2017 · 2 revisions

composer

Run the composer command inside the php docker container. The working directory will be the current directory you are executing this command from. Your $HOME/.ssh and $HOME/.composer folders wil be mounted inside this container to enable you to make use of your ssh keys and composer cache.

eg. $ composer require package_name

create_db

Create a new database inside the running mysql container with the name 'pimcore' and 'DEFAULT CHARSET utf8'.

eg. $ create_db

mysql

Execute a mysql command inside the running mysql container as the root user.

eg. $ mysql "SELECT * FROM table_name;"

mysqldump

Execute the mysqldump command inside the running mysql container as the root user.

eg. $ mysqldump db_name > export_file_name.sql

mysqlimport

Import a given mysql file into a given database, inside the running mysql container as the root user.

eg. $ mysqlimport db_name import_file_name.sql

node

Execute the node command inside a node container. The working directory will be the current directory you are executing this command from.

eg. $ node js_file.js

npm

Execute the npm command inside a node container. The working directory will be the current directory you are executing this command from. Your $HOME/.ssh and $HOME/.npm folders wil be mounted inside this container to enable you to make use of your ssh keys and npm cache.

eg. $ npm install package_name

yarn

Execute the yarn command inside a node container. The working directory will be the current directory you are executing this command from. Your $HOME/.ssh and $HOME/.npm folders wil be mounted inside this container to enable you to make use of your ssh keys and npm cache.

eg. $ yarn add package_name

php

Execute the php command inside the running php container, or inside a php-pimcore container if none is running. The working directory will be the current directory you are executing this command from.

eg. $ php -v

redis-cli

Execute the redis-cli command in the running redis container.

eg. $ redis-cli flushall

run

Run docker-compose for the current project, setting the project name to the BASEHOST variable from the .env file

eg. $ run up

Clone this wiki locally