docker-compose.yml
· 1016 B · YAML
Raw
services:
wordpress:
image: wordpress:latest
container_name: wordpress
healthcheck:
test: curl -f http://localhost:80/ || exit 1
# ports:
# - 8000:80
depends_on:
redis:
condition: service_healthy
volumes:
- /home/debian/wordpress:/var/www/html:rw
- /home/debian/wordpress/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:rw # custom php.ini
environment:
WORDPRESS_DB_HOST: mysql #name container mysql
WORDPRESS_DB_USER: your_user
WORDPRESS_DB_PASSWORD: your_password
WORDPRESS_DB_NAME: name_databas
networks:
- npm-internal
restart: unless-stopped
redis:
image: redis:latest
container_name: redis
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
volumes:
- /home/debian/wordpress/redis:/data:rw
environment:
TZ: Europe/Rome
networks:
- npm-internal
restart: unless-stopped
networks:
npm-internal:
name: npm-internal
external: true
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/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:rw # custom php.ini |
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 |