mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-19 18:36:09 +02:00
Using working healthcheck for compose and also moving to non-build but download image
This commit is contained in:
parent
ebf05aa012
commit
8e500edbfc
4 changed files with 36 additions and 29 deletions
|
@ -18,9 +18,10 @@ services:
|
||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build:
|
image: nextcloud:29.0.4-apache
|
||||||
context: ../29/fpm
|
#build: # The build takes currently ~ 30 minutes which is far too long for daily testing
|
||||||
dockerfile: Dockerfile
|
# context: ../29/fpm
|
||||||
|
# dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
links:
|
links:
|
||||||
- db
|
- db
|
||||||
|
@ -31,6 +32,11 @@ services:
|
||||||
- MYSQL_DATABASE=nextcloud
|
- MYSQL_DATABASE=nextcloud
|
||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
- MYSQL_HOST=db
|
- MYSQL_HOST=db
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail --silent http://nc
|
||||||
|
interval: "1h" # effectively turns repeated healthchecks during runtime off
|
||||||
|
start-period: "60s"
|
||||||
|
start-interval: "1s"
|
||||||
|
|
||||||
nc:
|
nc:
|
||||||
image: nginx:1.25.1-alpine3.17
|
image: nginx:1.25.1-alpine3.17
|
||||||
|
@ -43,8 +49,3 @@ services:
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
# healthcheck:
|
|
||||||
# test: curl -f http://nc
|
|
||||||
# interval: "1h" # effectively turns repeated healthchecks during runtime off
|
|
||||||
# start-period: "1s" # Not yet supported. Will come with Docker CE 25.0
|
|
||||||
# start-interval: "1s" # Not yet supported. Will come with Docker CE 25.0
|
|
||||||
|
|
|
@ -18,8 +18,10 @@ services:
|
||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
|
|
||||||
nc:
|
nc:
|
||||||
build:
|
image: nextcloud:29.0.4-apache
|
||||||
context: ../29/apache
|
#build: # The build takes currently ~ 30 minutes which is far too long for daily testing
|
||||||
|
# context: ../29/fpm
|
||||||
|
# dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
|
@ -32,8 +34,8 @@ services:
|
||||||
- MYSQL_DATABASE=nextcloud
|
- MYSQL_DATABASE=nextcloud
|
||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
- MYSQL_HOST=db
|
- MYSQL_HOST=db
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: curl -f http://nc
|
test: curl --fail --silent http://localhost
|
||||||
# interval: "1h" # effectively turns repeated healthchecks during runtime off
|
interval: "1h" # effectively turns repeated healthchecks during runtime off
|
||||||
# start-period: "1s" # Not yet supported. Will come with Docker CE 25.0
|
start-period: "60s"
|
||||||
# start-interval: "1s" # Not yet supported. Will come with Docker CE 25.0
|
start-interval: "1s"
|
||||||
|
|
|
@ -16,8 +16,10 @@ services:
|
||||||
- POSTGRES_USER=nextcloud
|
- POSTGRES_USER=nextcloud
|
||||||
|
|
||||||
nc:
|
nc:
|
||||||
build:
|
image: nextcloud:29.0.4-apache
|
||||||
context: ../29/apache
|
#build: # The build takes currently ~ 30 minutes which is far too long for daily testing
|
||||||
|
# context: ../29/fpm
|
||||||
|
# dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
|
@ -30,8 +32,8 @@ services:
|
||||||
- POSTGRES_DB=nextcloud
|
- POSTGRES_DB=nextcloud
|
||||||
- POSTGRES_USER=nextcloud
|
- POSTGRES_USER=nextcloud
|
||||||
- POSTGRES_HOST=db
|
- POSTGRES_HOST=db
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: curl -f http://nc
|
test: curl --fail --silent http://localhost
|
||||||
# interval: "1h" # effectively turns repeated healthchecks during runtime off
|
interval: "1h" # effectively turns repeated healthchecks during runtime off
|
||||||
# start-period: "1s" # Not yet supported. Will come with Docker CE 25.0
|
start-period: "60s"
|
||||||
# start-interval: "1s" # Not yet supported. Will come with Docker CE 25.0
|
start-interval: "1s"
|
||||||
|
|
|
@ -2,15 +2,17 @@ version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nc:
|
nc:
|
||||||
build:
|
image: nextcloud:29.0.4-apache
|
||||||
context: ../29/apache
|
#build: # The build takes currently ~ 30 minutes which is far too long for daily testing
|
||||||
|
# context: ../29/fpm
|
||||||
|
# dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
#volumes:
|
#volumes:
|
||||||
# - nextcloud:/var/www/html # This is the usual way of using nextcloud in a container, but we do not need persistent data storage for benchmarking
|
# - nextcloud:/var/www/html # This is the usual way of using nextcloud in a container, but we do not need persistent data storage for benchmarking
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: curl -f http://nc
|
test: curl --fail --silent http://localhost
|
||||||
# interval: "1h" # effectively turns repeated healthchecks during runtime off
|
interval: "1h" # effectively turns repeated healthchecks during runtime off
|
||||||
# start-period: "1s" # Not yet supported. Will come with Docker CE 25.0
|
start-period: "60s"
|
||||||
# start-interval: "1s" # Not yet supported. Will come with Docker CE 25.0
|
start-interval: "1s"
|
||||||
|
|
Loading…
Add table
Reference in a new issue