mirror of
https://github.com/ONLYOFFICE/Docker-DocumentServer.git
synced 2026-02-10 12:35:25 +08:00
Streamline docker-compose by pinning RabbitMQ & PostgreSQL and adding healthchecks (#28)
This commit is contained in:
@ -2,6 +2,7 @@ services:
|
|||||||
onlyoffice-documentserver:
|
onlyoffice-documentserver:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
image: onlyoffice/documentserver #[-de,-ee]
|
||||||
container_name: onlyoffice-documentserver
|
container_name: onlyoffice-documentserver
|
||||||
depends_on:
|
depends_on:
|
||||||
- onlyoffice-postgresql
|
- onlyoffice-postgresql
|
||||||
@ -21,6 +22,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '80:80'
|
- '80:80'
|
||||||
- '443:443'
|
- '443:443'
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:8000/info/info.json"]
|
||||||
|
interval: 30s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
timeout: 10s
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
restart: always
|
restart: always
|
||||||
stop_grace_period: 60s
|
stop_grace_period: 60s
|
||||||
@ -33,14 +40,20 @@ services:
|
|||||||
|
|
||||||
onlyoffice-rabbitmq:
|
onlyoffice-rabbitmq:
|
||||||
container_name: onlyoffice-rabbitmq
|
container_name: onlyoffice-rabbitmq
|
||||||
image: rabbitmq
|
image: rabbitmq:3
|
||||||
restart: always
|
restart: always
|
||||||
expose:
|
expose:
|
||||||
- '5672'
|
- '5672'
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "rabbitmq-diagnostics", "status"]
|
||||||
|
interval: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
timeout: 10s
|
||||||
|
|
||||||
onlyoffice-postgresql:
|
onlyoffice-postgresql:
|
||||||
container_name: onlyoffice-postgresql
|
container_name: onlyoffice-postgresql
|
||||||
image: postgres:12
|
image: postgres:15
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=onlyoffice
|
- POSTGRES_DB=onlyoffice
|
||||||
- POSTGRES_USER=onlyoffice
|
- POSTGRES_USER=onlyoffice
|
||||||
@ -50,6 +63,12 @@ services:
|
|||||||
- '5432'
|
- '5432'
|
||||||
volumes:
|
volumes:
|
||||||
- postgresql_data:/var/lib/postgresql
|
- postgresql_data:/var/lib/postgresql
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U onlyoffice"]
|
||||||
|
interval: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
timeout: 10s
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgresql_data:
|
postgresql_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user