This extends mysql:latest
with cron & curl which is used with our
deployed Wordpress websites.
version: '3.8'
services:
cron:
image: nonfiction/wordpress-cron:v3
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
resources:
limits:
cpus: '0.1'
memory: 20M
reservations:
cpus: '0.0'
memory: 5M
environment:
HOST: "mysite.abc.example.com"
HOST_USER: "mysite"
HOST_PASSWORD: "secret"
DB_HOST: "mysql.example.com"
DB_PORT: "3306"
DB_USER: "mysite"
DB_PASSWORD: "supersecretpassword"
DB_NAME: "mysite_abc_example_com"
volumes:
- /data/mysite/dump.sql:/cron/dump.sql
make update
make build
make push
make shell