-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.98 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.98 KB
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
69
70
71
72
services:
# db:
# image: mariadb:11
# restart: unless-stopped
# environment:
# MARIADB_ROOT_PASSWORD: example
# MARIADB_DATABASE: nextcloud
# MARIADB_USER: nextcloud
# MARIADB_PASSWORD: nextcloud
# command: >
# --transaction-isolation=READ-COMMITTED
# --binlog-format=ROW
# --innodb-read-only-compressed=OFF
# volumes:
# - db_data:/var/lib/mysql
# healthcheck:
# test: ["CMD-SHELL", "mysqladmin ping -h localhost -u$$MARIADB_USER -p$$MARIADB_PASSWORD || exit 1"]
# interval: 10s
# timeout: 5s
# retries: 10
# redis:
# image: redis:7-alpine
# restart: unless-stopped
# command: ["redis-server", "--save", "", "--appendonly", "no"]
# healthcheck:
# test: ["CMD", "redis-cli", "ping"]
# interval: 10s
# timeout: 5s
# retries: 10
nextcloud:
image: nextcloud:latest
restart: unless-stopped
# depends_on:
# db:
# condition: service_healthy
# redis:
# condition: service_started
ports:
- "8081:80"
environment:
# # DB
# MYSQL_HOST: db
# MYSQL_DATABASE: nextcloud
# MYSQL_USER: nextcloud
# MYSQL_PASSWORD: nextcloud
# Initial admin (used only on first run)
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD: admin
NEXTCLOUD_TRUSTED_DOMAINS: localhost
# Redis cache (optional but recommended)
# REDIS_HOST: redis
# Recommended PHP memory limit for NC
PHP_MEMORY_LIMIT: 512M
volumes:
- nextcloud_data:/var/www/html
- ./apps/sustainability:/opt/src/sustainability:ro,Z
- custom_apps:/var/www/html/custom_apps
command: >
sh -c "
mkdir -p /var/www/html/custom_apps/sustainability &&
rsync -a --delete /opt/src/sustainability/ /var/www/html/custom_apps/sustainability/ &&
chown -R 33:33 /var/www/html/custom_apps &&
exec apache2-foreground
"
volumes:
db_data:
nextcloud_data:
custom_apps: