emanuelegori 修订了这个 Gist . 转到此修订
1 file changed, 1 insertion, 1 deletion
docker-compose.yml
@@ -11,7 +11,7 @@ services: | |||
11 | 11 | condition: service_healthy | |
12 | 12 | volumes: | |
13 | 13 | - /home/debian/wordpress:/var/www/html:rw | |
14 | - | - /home/debian/wordpress/upload.ini:/usr/local/etc/php/conf.d/uploads.ini:rw | |
14 | + | - /home/debian/wordpress/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:rw # custom php.ini | |
15 | 15 | environment: | |
16 | 16 | WORDPRESS_DB_HOST: mysql #name container mysql | |
17 | 17 | WORDPRESS_DB_USER: your_user |
emanuelegori 修订了这个 Gist . 转到此修订
1 file changed, 5 deletions
docker-compose.yml
@@ -7,12 +7,8 @@ services: | |||
7 | 7 | # ports: | |
8 | 8 | # - 8000:80 | |
9 | 9 | depends_on: | |
10 | - | # mysql: | |
11 | - | # condition: service_started | |
12 | 10 | redis: | |
13 | 11 | condition: service_healthy | |
14 | - | # phpmyadmin: | |
15 | - | # condition: service_started | |
16 | 12 | volumes: | |
17 | 13 | - /home/debian/wordpress:/var/www/html:rw | |
18 | 14 | - /home/debian/wordpress/upload.ini:/usr/local/etc/php/conf.d/uploads.ini:rw | |
@@ -27,7 +23,6 @@ services: | |||
27 | 23 | redis: | |
28 | 24 | image: redis:latest | |
29 | 25 | container_name: redis | |
30 | - | user: 1000:1000 | |
31 | 26 | healthcheck: | |
32 | 27 | test: ["CMD-SHELL", "redis-cli ping || exit 1"] | |
33 | 28 | volumes: |
emanuelegori 修订了这个 Gist . 转到此修订
1 file changed, 45 insertions
docker-compose.yml(文件已创建)
@@ -0,0 +1,45 @@ | |||
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 | + |