1- # itk-version: 3.2.1
1+ # itk-version: 3.2.3
22networks :
33 frontend :
44 external : true
@@ -13,6 +13,12 @@ services:
1313 - app
1414 ports :
1515 - ' 3306'
16+ healthcheck :
17+ test : [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
18+ start_period : 10s
19+ interval : 10s
20+ timeout : 5s
21+ retries : 3
1622 environment :
1723 - MYSQL_ROOT_PASSWORD=password
1824 - MYSQL_USER=db
@@ -25,6 +31,7 @@ services:
2531
2632 phpfpm :
2733 image : itkdev/php8.3-fpm:latest
34+ user : ${COMPOSE_USER:-deploy}
2835 networks :
2936 - app
3037 extra_hosts :
@@ -34,13 +41,16 @@ services:
3441 - PHP_MAX_EXECUTION_TIME=30
3542 - PHP_MEMORY_LIMIT=256M
3643 # Depending on the setup, you may have to remove --read-envelope-from from msmtp (cf. https://marlam.de/msmtp/msmtp.html) or use SMTP to send mail
37- - PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients
44+ - PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from
3845 - DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
39- - COMPOSER_VERSION=2
4046 - PHP_IDE_CONFIG=serverName=localhost
47+ # Let drush know the site uri (makes using --uri redundant)
48+ - DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN}
4149 depends_on :
42- - mariadb
43- - memcached
50+ mariadb :
51+ condition : service_healthy
52+ memcached :
53+ condition : service_healthy
4454 volumes :
4555 - .:/app
4656
@@ -65,16 +75,20 @@ services:
6575 - " traefik.enable=true"
6676 - " traefik.docker.network=frontend"
6777 - " traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)"
68- # HTTPS config - uncomment to enable redirect from :80 to :443
69- # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
70- # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
78+ # HTTPS config - uncomment to enable redirect from :80 to :443
79+ # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
80+ # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
7181
7282 memcached :
73- image : ' memcached:latest '
83+ image : memcached:alpine
7484 networks :
7585 - app
7686 ports :
7787 - ' 11211'
88+ healthcheck :
89+ test : echo "version" | nc -vn -w 1 127.0.0.1 11211
90+ interval : 10s
91+ retries : 60
7892 environment :
7993 - MEMCACHED_CACHE_SIZE=64
8094
0 commit comments