87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
version: "3.9"
|
|
services:
|
|
onlyoffice-documentserver:
|
|
build:
|
|
context: .
|
|
container_name: onlyoffice-documentserver
|
|
depends_on:
|
|
- onlyoffice-postgresql
|
|
- onlyoffice-rabbitmq
|
|
environment:
|
|
- USE_SECRETS=false # ← Set on "true" if you plan use secrets.
|
|
- DB_TYPE=postgres
|
|
- DB_HOST=onlyoffice-postgresql
|
|
- DB_PORT=5432
|
|
- DB_NAME=onlyoffice
|
|
- DB_USER=onlyoffice
|
|
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
|
|
# Uncomment strings below to enable the JSON Web Token validation.
|
|
#- JWT_ENABLED=true
|
|
#- JWT_IN_BODY=true
|
|
#- JWT_SECRET=secret
|
|
#- JWT_HEADER=Authorization
|
|
# ↑ Uncomment two upper strings to use jwt_secret and jwt_header values by default without docker secrets.
|
|
# ↓ Or uncomment two strings below to use jwt_secret and jwt_header values from docker secrets that you create.
|
|
#- JWT_SECTER_FILE=/run/secrets/jwtSecret
|
|
#- JWT_HEADER_FILE=/run/secrets/jwtHeader
|
|
ports:
|
|
- '80:80'
|
|
- '443:443'
|
|
stdin_open: true
|
|
restart: always
|
|
stop_grace_period: 60s
|
|
volumes:
|
|
- /var/www/onlyoffice/Data
|
|
- /var/log/onlyoffice
|
|
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
|
|
- /var/www/onlyoffice/documentserver-example/public/files
|
|
- /usr/share/fonts
|
|
# ↓ If you use docker secrets, uncomment srtings below only with secrets that you will use in your installtion
|
|
#secrets:
|
|
# - dbUser
|
|
# - dbPass
|
|
# - jwtSecret
|
|
# - jwtHeader
|
|
|
|
onlyoffice-rabbitmq:
|
|
container_name: onlyoffice-rabbitmq
|
|
image: rabbitmq
|
|
restart: always
|
|
expose:
|
|
- '5672'
|
|
|
|
onlyoffice-postgresql:
|
|
container_name: onlyoffice-postgresql
|
|
image: postgres:9.5
|
|
environment:
|
|
- POSTGRES_DB=onlyoffice
|
|
- POSTGRES_USER=onlyoffice
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
# ↑ Comment two lines upper: POSTGRES_HOST_AUTH_METHOD and POSTGRES_USER and
|
|
# ↓ Uncomment two strings below for use database access values from secrets that you create.
|
|
#- POSTGRES_USER_FILE=/run/secrets/dbUser
|
|
#- POSTGRES_PASSWORD_FILE=/run/secrets/dbPass
|
|
restart: always
|
|
expose:
|
|
- '5432'
|
|
volumes:
|
|
- postgresql_data:/var/lib/postgresql
|
|
# ↓ If you use docker secrets, uncomment srtings below only with secrets that you will use in your installtion
|
|
#secrets:
|
|
# - dbUser
|
|
# - dbPass
|
|
|
|
# ↓ If you use docker secrets, uncomment srtings below only with secrets that you will use in your installtion
|
|
#secrets:
|
|
# dbUser:
|
|
# external: true
|
|
# dbPass:
|
|
# external: true
|
|
# jwtSecret:
|
|
# external: true
|
|
# jwtHeader:
|
|
# external: true
|
|
|
|
volumes:
|
|
postgresql_data:
|