Skip to content

jperon-skilld/skilld-docker-container

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skilld docker container


Overview

Skilld docker container is a developer starterkit for your Drupal project.

What is this?

  • This is a developer starterkit which can be used for local drupal development or/and integration into your CI/CD processes.

What is this not?

Quickstart

Used variables

Variable name Description Default value
COMPOSE_FILE Path to a Compose file(s) ./docker/docker-compose.yml:./docker/docker-compose.override.yml
COMPOSE_PROJECT_NAME Your project name -
PROFILE_NAME Profile used for site install sdd
MODULES Additional modules to enable after site install
THEME_NAME Theme name used for frontend -
SITE_NAME Site name -
SITE_MAIL Site e-mail address [email protected]
PROJECT_INSTALL Way to install site - from straight or existing config -
IMAGE_PHP Php image to use skilldlabs/php:72-fpm
IMAGE_NGINX Image to use for nginx container skilldlabs/nginx:1.14.1
IMAGE_FRONT Image to use for front tasks skilldlabs/frontend:zen
MAIN_DOMAIN_NAME Domain name used for traefik docker.localhost
DB_URL Url to connect to database sqlite:///dev/shm/d8.sqlite
DB_DATA_DIR Full path to database storage /dev/shm

Persistent Mysql

  • By default sqlite storage used, which is created inside php container, if you need persistent data to be saved:
    • Update docker-compose.override.yml, set
    php:
       depends_on:
         - mysql
    and update mysql container part
    mysql:
      image: percona:5.7.22
    ...
    • Update .env file, and set DB_URL=mysql://d8:d8@mysql/d8

Network

  • Every time project built, it take new available IP address, if you want to have persistent IP, uncomment lines from docker-compose.override.yml
networks:
  front:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: "172.18.0.5"

Usage

  • make - Show this info.
  • make all - Full project install from the scratch.
  • make clean - Totally remove project build folder, files, docker containers and network.
  • make si - Install/reinstall site.
  • make info - Show project services IP addresses.
  • make exec - docker exec into php container.
  • make exec0 - docker exec into php container as root.
  • make dev - Devel + kint setup, and config for Twig debug mode, disable aggregation.
  • make drush [command] - execute drush command.
  • make phpcs - Check codebase with phpcs sniffers to make sure it conforms https://www.drupal.org/docs/develop/standards.
  • make phpcbf - Fix codebase according to Drupal standards https://www.drupal.org/docs/develop/standards.
  • make front - Builds frontend tasks.
  • make lint - Runs frontend linters.

Additional goals

  • If you need to add your custom/specific project goal, create new file in scripts/makefile/myfile.mk and describe goal inside. Example can be found at scripts/makefile/backup.mk

Support

Drush commands

  • You can run any drush command make drush [command -- -argument]

Troubleshooting

  • Use our issue queue, which is public, to search or add new issues.

Git hooks

  • Project includes pre-commit git hooks to perform automatic checks when git commit is executed
  • You can bypass these checks by running git commit --no-verify

License

This project is licensed under the MIT open source license.

About

Starterkit for drupal development

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 48.3%
  • Makefile 44.3%
  • Shell 7.4%