-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.nextcloud.yml
42 lines (39 loc) · 1.12 KB
/
docker-compose.nextcloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: '3'
services:
db:
image: mariadb
container_name: nextcloud_db
network_mode: 'yournetwork'
restart: always
volumes:
- /your/path/nextcloud/db:/var/lib/mysql
- "/etc/localtime:/etc/localtime:ro" #TO HAVE CORRECT TIME INSIDE CONTAINER
environment:
- MYSQL_HOST=yourDBHostname
- MYSQL_PASSWORD=yourPassword
- MYSQL_ROOT_PASSWORD=yourRootPassword
- MYSQL_DATABASE=yourDBname
- MYSQL_USER=yourDBUser
app:
image: nextcloud:apache
container_name: nextcloud
network_mode: 'yournetwork'
restart: always
ports:
- 80
volumes:
- /your/path/nextcloud:/var/www/html
- "/etc/localtime:/etc/localtime:ro" #TO HAVE CORRECT TIME INSIDE CONTAINER
environment:
- MYSQL_HOST=yourDBHostname
- MYSQL_PASSWORD=yourPassword
- MYSQL_DATABASE=yourDBname
- MYSQL_USER=yourDBUser
depends_on:
- db
labels:
- 'traefik.enable=true'
- 'traefik.port=80'
- 'traefik.frontend.entryPoints=http,https'
- 'traefik.frontend.rule=Host:nextcloud.yourdns.zone'
- 'traefik.backend=nextcloud'