Skip to content

Commit 1ddfbaa

Browse files
committed
Feat: Nextcloud MariaDB and MySQL versions
1 parent 32aaf95 commit 1ddfbaa

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# documentation: https://docs.nextcloud.com
2+
# slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management.
3+
# tags: cloud, collaboration, communication, filestorage, data
4+
# logo: svgs/nextcloud.svg
5+
# port: 80
6+
7+
services:
8+
nextcloud:
9+
image: lscr.io/linuxserver/nextcloud:latest
10+
environment:
11+
- SERVICE_FQDN_NEXTCLOUD_80
12+
- PUID=1000
13+
- PGID=1000
14+
- TZ=${TZ:-Europe/Paris}
15+
- MYSQL_DATABASE=${MARIADB_DATABASE:-nextcloud}
16+
- MYSQL_USER=${SERVICE_USER_MARIADB}
17+
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MARIADB}
18+
- MYSQL_HOST=nextcloud-db
19+
- REDIS_HOST=redis
20+
- REDIS_PORT=6379
21+
volumes:
22+
- nextcloud-config:/config
23+
- nextcloud-data:/data
24+
depends_on:
25+
nextcloud-db:
26+
condition: service_healthy
27+
redis:
28+
condition: service_healthy
29+
healthcheck:
30+
test: ["CMD", "curl", "-f", "http://127.0.0.1:80"]
31+
interval: 2s
32+
timeout: 10s
33+
retries: 15
34+
35+
nextcloud-db:
36+
image: mariadb:11
37+
volumes:
38+
- nextcloud-mariadb-data:/var/lib/mysql
39+
environment:
40+
- MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_ROOT}
41+
- MYSQL_DATABASE=${MARIADB_DATABASE:-nextcloud}
42+
- MYSQL_USER=${SERVICE_USER_MARIADB}
43+
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MARIADB}
44+
healthcheck:
45+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
46+
interval: 5s
47+
timeout: 20s
48+
retries: 10
49+
50+
redis:
51+
image: "redis:7.4-alpine"
52+
volumes:
53+
- "nextcloud-redis-data:/data"
54+
healthcheck:
55+
test:
56+
- CMD
57+
- redis-cli
58+
- PING
59+
interval: 5s
60+
timeout: 10s
61+
retries: 20
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# documentation: https://docs.nextcloud.com
2+
# slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management.
3+
# tags: cloud, collaboration, communication, filestorage, data
4+
# logo: svgs/nextcloud.svg
5+
# port: 80
6+
7+
services:
8+
nextcloud:
9+
image: lscr.io/linuxserver/nextcloud:latest
10+
environment:
11+
- SERVICE_FQDN_NEXTCLOUD_80
12+
- PUID=1000
13+
- PGID=1000
14+
- TZ=${TZ:-Europe/Paris}
15+
- MYSQL_DATABASE=${MYSQL_DATABASE:-nextcloud}
16+
- MYSQL_USER=${SERVICE_USER_MYSQL}
17+
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}
18+
- MYSQL_HOST=nextcloud-db
19+
- REDIS_HOST=redis
20+
- REDIS_PORT=6379
21+
volumes:
22+
- nextcloud-config:/config
23+
- nextcloud-data:/data
24+
depends_on:
25+
nextcloud-db:
26+
condition: service_healthy
27+
redis:
28+
condition: service_healthy
29+
healthcheck:
30+
test: ["CMD", "curl", "-f", "http://127.0.0.1:80"]
31+
interval: 2s
32+
timeout: 10s
33+
retries: 15
34+
35+
nextcloud-db:
36+
image: mysql:8.4.2
37+
volumes:
38+
- nextcloud-mysql-data:/var/lib/mysql
39+
environment:
40+
- MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_ROOT}
41+
- MYSQL_DATABASE=${MYSQL_DATABASE:-nextcloud}
42+
- MYSQL_USER=${SERVICE_USER_MYSQL}
43+
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}
44+
healthcheck:
45+
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
46+
interval: 5s
47+
timeout: 20s
48+
retries: 10
49+
50+
redis:
51+
image: "redis:7.4-alpine"
52+
volumes:
53+
- "nextcloud-redis-data:/data"
54+
healthcheck:
55+
test:
56+
- CMD
57+
- redis-cli
58+
- PING
59+
interval: 5s
60+
timeout: 10s
61+
retries: 20

0 commit comments

Comments
 (0)