| 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 | # mysql: |
| 11 | # condition: service_started |
| 12 | redis: |
| 13 | condition: service_healthy |
| 14 | # phpmyadmin: |
| 15 | # condition: service_started |
| 16 | volumes: |
| 17 | - /home/debian/wordpress:/var/www/html:rw |
| 18 | - /home/debian/wordpress/upload.ini:/usr/local/etc/php/conf.d/uploads.ini:rw |
| 19 | environment: |
| 20 | WORDPRESS_DB_HOST: mysql #name container mysql |
| 21 | WORDPRESS_DB_USER: your_user |
| 22 | WORDPRESS_DB_PASSWORD: your_password |
| 23 | WORDPRESS_DB_NAME: name_databas |
| 24 | networks: |
| 25 | - npm-internal |
| 26 | restart: unless-stopped |
| 27 | redis: |
| 28 | image: redis:latest |
| 29 | container_name: redis |
| 30 | user: 1000:1000 |
| 31 | healthcheck: |
| 32 | test: ["CMD-SHELL", "redis-cli ping || exit 1"] |
| 33 | volumes: |
| 34 | - /home/debian/wordpress/redis:/data:rw |
| 35 | environment: |
| 36 | TZ: Europe/Rome |
| 37 | networks: |
| 38 | - npm-internal |
| 39 | restart: unless-stopped |
| 40 | |
| 41 | networks: |
| 42 | npm-internal: |
| 43 | name: npm-internal |
| 44 | external: true |
| 45 |
emanuelegori / Wordpress & Redis
Last active 4 months ago
Revision 0a6628f0ca5e9da31602c1d454b444819385895c