-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
68 lines (62 loc) · 1.82 KB
/
docker-compose.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This is a docker-compose file for Nextcloud 26 and MariaDB 10.7.3
# Specifically, this is configured to my liking
# Volumes and Variables are not generic, so change them to your liking
version: '3'
services:
mariadb:
image: mariadb:10.7.3-focal
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- /AppData/nextcloud/mariadb:/var/lib/mysql
labels:
- com.centurylinklabs.watchtower.enable=false
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
redis:
image: redis
hostname: redis
restart: always
command: redis-server --loglevel warning --save 20 1 --requirepass ${DB_PASSWORD} --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- cache:/data
app:
image: nextcloud:27
hostname: Hurricane
restart: always
ports:
- "8080:80"
volumes:
- type: tmpfs
target: /tmp:exec
- /AppData/nextcloud/html/:/var/www/html
- /AppData/nextcloud/data:/srv/nextcloud/data
labels:
- com.centurylinklabs.watchtower.enable=false
environment:
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_HOST: mariadb
PHP_MEMORY_LIMIT: 1024M
REDIS_HOST: redis
REDIS_HOST_PASSWORD: ${DB_PASSWORD}
# Install Imagick and start nextcloud
command: >
bash -c "apt-get update
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq libmagickcore-6.q16-6-extra nano
&& DEBIAN_FRONTEND=noninteractive apt-get clean
&& rm -rf /var/lib/apt/lists/*
&& apache2-foreground"
depends_on:
- mariadb
- redis
volumes:
cache:
driver: local
networks:
default:
driver: bridge