| 1 | services: |
| 2 | wordpress: |
| 3 | image: wordpress:latest |
| 4 | container_name: wordpress |
| 5 | healthcheck: |
| 6 | test: curl -f http://localhost:80/ || exit 1 |
| 7 | # ports: |
| 8 | # - 8000:80 |
| 9 | depends_on: |
| 10 | redis: |
| 11 | condition: service_healthy |
| 12 | volumes: |
| 13 | - /home/debian/wordpress:/var/www/html:rw |
| 14 | - /home/debian/wordpress/upload.ini:/usr/local/etc/php/conf.d/uploads.ini:rw |
| 15 | environment: |
| 16 | WORDPRESS_DB_HOST: mysql #name container mysql |
| 17 | WORDPRESS_DB_USER: your_user |
| 18 | WORDPRESS_DB_PASSWORD: your_password |
| 19 | WORDPRESS_DB_NAME: name_databas |
| 20 | networks: |
| 21 | - npm-internal |
| 22 | restart: unless-stopped |
| 23 | redis: |
| 24 | image: redis:latest |
| 25 | container_name: redis |
| 26 | healthcheck: |
| 27 | test: ["CMD-SHELL", "redis-cli ping || exit 1"] |
| 28 | volumes: |
| 29 | - /home/debian/wordpress/redis:/data:rw |
| 30 | environment: |
| 31 | TZ: Europe/Rome |
| 32 | networks: |
| 33 | - npm-internal |
| 34 | restart: unless-stopped |
| 35 | |
| 36 | networks: |
| 37 | npm-internal: |
| 38 | name: npm-internal |
| 39 | external: true |
| 40 |
emanuelegori / Wordpress & Redis
Last active 4 months ago
Revision 241f756651daa614d1f6d8aa1d5085bddd660c11