docker-compose.yml
version: '3'
services:
web:
hostname: web
image: nginx
ports:
- 8080:80
networks:
- cloud_net
restart: always
volumes:
- ./nextcloud:/var/www/html
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
app:
hostname: app
image: nextcloud:14.0.3-fpm-alpine
restart: always
networks:
- cloud_net
volumes:
- ./nextcloud:/var/www/html
db:
hostname: db
image: mysql:8.0
restart: always
networks:
- cloud_net
volumes:
- ./db/data:/var/lib/mysql
command: --character-set-server=utf8
environment:
MYSQL_ROOT_PASSWORD: root123456
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud123
ports:
- 3306:3306
onlyoffice:
hostname: onlyoffice
image: onlyoffice/documentserver
restart: always
ports:
- 6060:80
networks:
- cloud_net
networks:
cloud_net:
nginx.conf
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
set_real_ip_