Last active 5 hours ago

Revision e0f32a81ac3873dea7beaeaec30fdd56ee36f628

nextcloud-compose.yml Raw
1services:
2 postgres:
3 image: postgres:17-alpine
4 restart: always
5 volumes:
6 - ./postgres:/var/lib/postgresql/data
7 environment:
8 - POSTGRES_DB=nextcloud
9 - POSTGRES_USER=nextcloud
10 - POSTGRES_PASSWORD=XYS22mtSXE5BSP9icaPxFZqw
11 networks:
12 - nextcloud-net
13 healthcheck: # Prüft, ob die DB wirklich bereit ist
14 test: ["CMD-SHELL", "pg_isready -U nextcloud"]
15 interval: 10s
16 timeout: 5s
17 retries: 5
18
19 valkey:
20 image: valkey/valkey:8-alpine
21 restart: always
22 mem_limit: 2g
23 command: valkey-server --requirepass 6dfK8X6upA4LmSerMlp11YKW --appendonly yes
24 environment:
25 - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
26 volumes:
27 - ./valkey:/data
28 networks:
29 - nextcloud-net
30
31 app:
32 container_name: nextcloud
33 image: nextcloud:32
34 restart: unless-stopped
35 mem_limit: 4g
36 ports:
37 - 8080:80
38 depends_on:
39 postgres:
40 condition: service_healthy # Wartet, bis DB wirklich bereit ist
41 valkey:
42 condition: service_started
43 volumes:
44 - ./nextcloud-data:/var/www/html
45 environment:
46 - POSTGRES_HOST=postgres
47 - POSTGRES_DB=nextcloud
48 - POSTGRES_USER=nextcloud
49 - POSTGRES_PASSWORD=XYS22mtSXE5BSP9icaPxFZqw
50
51 - REDIS_HOST=valkey
52 - REDIS_HOST_PASSWORD=6dfK8X6upA4LmSerMlp11YKW
53 networks:
54 - nextcloud-net
55
56 cron:
57 image: nextcloud:32
58 container_name: nextcloud-cron
59 restart: always
60 mem_limit: 4g
61 volumes:
62 - ./nextcloud-data:/var/www/html
63 entrypoint: /cron.sh
64 depends_on:
65 - postgres
66 - valkey
67 networks:
68 - nextcloud-net
69
70networks:
71 nextcloud-net:
72 driver: bridge