Advertisement
primall

Wordpress Docker-Compose auto update

Oct 19th, 2023 (edited)
816
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.28 KB | Source Code | 0 0
  1. version: "3.8"
  2. services:
  3.   db:
  4.     image: mariadb:latest
  5.     volumes:
  6.      - db_data:/var/lib/mysql
  7.     restart: always
  8.     environment:
  9.       MARIADB_ROOT_PASSWORD: secret
  10.       MARIADB_DATABASE: db_wp
  11.       MARIADB_USER: user_wp
  12.       MARIADB_PASSWORD: secret_wp
  13.     labels:
  14.      - com.centurylinklabs.watchtower.enable=true
  15.    
  16.   wordpress:
  17.     depends_on:
  18.      - db
  19.     image: wordpress:latest
  20.     volumes:
  21.      - wordpress_data:/var/www/html
  22.     ports:
  23.      - "80:80"
  24.     restart: always
  25.     environment:
  26.       WORDPRESS_DB_HOST: db:3306
  27.       WORDPRESS_DB_USER: user_wp
  28.       WORDPRESS_DB_PASSWORD: secret_wp
  29.       WORDPRESS_DB_NAME: db_wp
  30.     labels:
  31.      - com.centurylinklabs.watchtower.enable=true
  32.  
  33.   watchtower:
  34.     container_name: watchtower
  35.     image: containrrr/watchtower
  36.     restart: always
  37.     volumes:
  38.      - /var/run/docker.sock:/var/run/docker.sock
  39.     environment:
  40.      - TZ=Asia/Jakarta
  41.       - WATCHTOWER_CLEANUP=true
  42.       - WATCHTOWER_LABEL_ENABLE=true
  43.       - WATCHTOWER_INCLUDE_RESTARTING=true
  44.       - WATCHTOWER_HTTP_API_METRICS=true
  45.       - WATCHTOWER_SCHEDULE=0 0 * * * * #Gunakan 6 Field Cron Syntax
  46.     labels:
  47.      - com.centurylinklabs.watchtower.enable=true
  48.  
  49.      
  50. volumes:
  51.   db_data: {}
  52.   wordpress_data: {}    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement