Before starting Flightdeck, you need to be sure that other local web development environments stuch as MAMP, WAMP, Acquia Dev Desktop, and even locally installed services such as Solr are stopped.
Flightdeck acquires many of the same ports as these products, and they cannot be used at the same time.
docker kill $(docker ps -q)
Once the proper files have been deployed and the
.env file configured, you’re ready to start Flightdeck for the first time.
docker-compose up -d
Flightdeck includes several CLI tools in the
web container for your use. This includes Drush, Drupal Console, npm, sass, and others. This allows you to leverage these tools without installing them on your host OS.
To use the CLI tools:
docker-compose exec web /bin/bash
When your done with using Flightdeck, you can stop it as follows:
DO NOT use the
docker-compose down command!
down command deletes the containers, which includes the database container and your loaded database. The
kill command merely stops the containers, allowing you to pick up work where you left off.
Flightdeck is designed to run only one site codebase at a time. If you have multiple projects relying on Flightdeck you must shutdown Flightdeck for your current project before moving to the next one.
Remember, commands like
docker-compose look at your current working directory to know which
docker-compose.yml file to read.
Flightdeck provides two options to load databases, phpMyAdmin and a CLI method.
To use phpMyAdmin:
To use the CLI:
db-backups/folder in your project directory.
docker-compose exec db /bin/bash
*.sql) use the following command to load it:
mysql -C yourDatabaseName < /tmp/name_of_dump.sql
zcat /tmp/name_of_dump.sql.gz | mysql -C yourDatabaseName # gzip xzcat /tmp/name_of_dump.sql.lzo | mysql -C yourDatabaseName # xs lzopcat /tmp/name_of_dump.sql.lzo | mysql -C yourDatabaseName # LZO
Like any set of Docker containers, you can update Flightdeck to the most recent version by pulling the new image from Docker Hub:
The above will update all instances of Flightdeck on your system, so use with caution.
Many of the commands involved in using Flightdeck (and Docker in general) can be very long and annoying to type in. For that reason, you can use shell aliases to create shorter versions of the commands.
On macOS and Linux:
.bash_profilefile in your home directory.
alias docup='docker-compose pull && docker-compose up -d && docker-compose exec web /bin/bash' alias docweb='docker-compose exec web /bin/bash' alias docdb='docker-compose exec db /bin/bash' alias dockill='docker-compose kill'
Once saved you can use the alias in place of the longer command. To update, start, and open an interactive shell, use
cd path/to/my_project docup