generated from bisco/codex-bootstrap
feat: add internal WordPress cron runner
This commit is contained in:
@@ -81,6 +81,47 @@ services:
|
||||
- no-new-privileges:true
|
||||
pids_limit: 300
|
||||
|
||||
wp-cron:
|
||||
image: wordpress:cli-2.12.0-php8.3
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
user: "33:33"
|
||||
working_dir: /var/www/html
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db:3306
|
||||
WORDPRESS_DB_NAME: ${MARIADB_DATABASE:-azionelab}
|
||||
WORDPRESS_DB_USER: ${MARIADB_USER:-azionelab}
|
||||
WORDPRESS_DB_PASSWORD: ${MARIADB_PASSWORD:-replace-with-a-local-password}
|
||||
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX:-azl_}
|
||||
WP_CRON_INTERVAL_SECONDS: ${WP_CRON_INTERVAL_SECONDS:-300}
|
||||
WP_ENVIRONMENT_TYPE: ${WP_ENVIRONMENT_TYPE:-local}
|
||||
WP_URL: ${WP_URL:-http://azionelab.org:8080}
|
||||
HOME: /tmp
|
||||
HTTP_HOST: ${LETSENCRYPT_DOMAIN:-azionelab.org}
|
||||
entrypoint: ["/bin/sh"]
|
||||
command: ["/scripts/cron.sh"]
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ${WORDPRESS_DATA_PATH:-./runtime/wordpress}
|
||||
target: /var/www/html
|
||||
bind:
|
||||
create_host_path: true
|
||||
- ./wp-cli/cron.sh:/scripts/cron.sh:ro
|
||||
networks:
|
||||
- data
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
wordpress:
|
||||
condition: service_healthy
|
||||
tmpfs:
|
||||
- /tmp
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
pids_limit: 100
|
||||
|
||||
proxy:
|
||||
build:
|
||||
context: ./nginx
|
||||
|
||||
Reference in New Issue
Block a user