Jarno Rankinen 修订了这个 Gist . 跳至此修订
1 file changed, 1 insertion
nextcloud.yaml
@@ -6,6 +6,7 @@ data: | |||
6 | 6 | POSTGRES_USER: postgres_username | |
7 | 7 | POSTGRES_DB: postgres_db_for_nextcloud_name | |
8 | 8 | POSTGRES_PASSWORD: postgres_password | |
9 | + | POSTGRES_HOST: 127.0.0.1 # Don't change unless using a separate DB | |
9 | 10 | NEXTCLOUD_ADMIN_USER: nextcloud-admin | |
10 | 11 | NEXTCLOUD_ADMIN_PASSWORD: nextcloud-admin-password | |
11 | 12 | NEXTCLOUD_TRUSTED_DOMAINS: nextcloud.example.com 192.168.23.45 |
Jarno Rankinen 修订了这个 Gist . 跳至此修订
没有变更
Jarno Rankinen 修订了这个 Gist . 跳至此修订
2 files changed, 16 insertions, 15 deletions
nextcloud.yaml
@@ -3,15 +3,15 @@ kind: ConfigMap | |||
3 | 3 | metadata: | |
4 | 4 | name: nextcloud-config | |
5 | 5 | data: | |
6 | - | POSTGRES_USER: ### POSTGRES KÄYTTÄJÄ TÄHÄN #### | |
7 | - | POSTGRES_DB: ### POSTGRES TIETOKANTA TÄHÄN ### | |
8 | - | POSTGRES_PASSWORD: ### POSTGRES SALASANA TÄHÄN ### | |
9 | - | NEXTCLOUD_ADMIN_USER: ### ADMIN-KÄYTTÄJÄ TÄHÄN ### | |
10 | - | NEXTCLOUD_ADMIN_PASSWORD: ### ADMIN-KÄYTTÄJÄN SALASANA ### | |
11 | - | NEXTCLOUD_TRUSTED_DOMAINS: ### TRUSTED DOMAINS, esim. cloud.example.com 192.168.4.5 | |
6 | + | POSTGRES_USER: postgres_username | |
7 | + | POSTGRES_DB: postgres_db_for_nextcloud_name | |
8 | + | POSTGRES_PASSWORD: postgres_password | |
9 | + | NEXTCLOUD_ADMIN_USER: nextcloud-admin | |
10 | + | NEXTCLOUD_ADMIN_PASSWORD: nextcloud-admin-password | |
11 | + | NEXTCLOUD_TRUSTED_DOMAINS: nextcloud.example.com 192.168.23.45 | |
12 | 12 | REDIS_HOST: 127.0.0.1 | |
13 | 13 | REDIS_PORT: 6379 | |
14 | - | ## NÄITÄ VOI TUNKATA MYÖS ## | |
14 | + | ## Tune these if necessary | |
15 | 15 | PHP_MEMORY_LIMIT: 3G | |
16 | 16 | PHP_UPLOAD_LIMIT: 10G | |
17 | 17 | TZ: Europe/Helsinki | |
@@ -27,15 +27,15 @@ metadata: | |||
27 | 27 | spec: | |
28 | 28 | volumes: | |
29 | 29 | - hostPath: | |
30 | - | path: ## CLAMAV-CONFIG POLKU TÄHÄN ## | |
30 | + | path: /path/to/clamav/config/directory/on/host ## EDIT | |
31 | 31 | type: Directory | |
32 | 32 | name: clamav-config-host-1 | |
33 | 33 | - hostPath: | |
34 | - | path: ## NEXTCLOUD WEB-JUUREN POLKU TÄHÄN (/var/www/nextcloud) ## | |
34 | + | path: /path/to/nextcloud/webroot/on/host ## EDIT | |
35 | 35 | type: Directory | |
36 | 36 | name: nextcloud-app-host-0 | |
37 | 37 | - hostPath: | |
38 | - | path: ## REDIS-DUMPIN POLKU TÄHÄN ## | |
38 | + | path: /path/to/redis/dump/on/host ## EDIT | |
39 | 39 | type: Directory | |
40 | 40 | name: nextcloud-redis-host-0 | |
41 | 41 | - name: clamav-db |
pod-nextcloud.service
@@ -1,17 +1,18 @@ | |||
1 | 1 | [Unit] | |
2 | 2 | Description=Podman pod - Nextcloud | |
3 | 3 | After=network-online.target | |
4 | - | AssertPathExists=/path/to/nextcloud/webroot | |
4 | + | AssertPathExists=/path/to/nextcloud/webroot/on/host | |
5 | 5 | ||
6 | 6 | [Service] | |
7 | 7 | Type=forking | |
8 | 8 | Restart=on-failure | |
9 | 9 | RestartSec=30 | |
10 | - | ExecStartPre=/path/to/nextcloud/bin/fix-htaccess | |
11 | - | ExecStart=podman play kube --replace /path/to/nextcloud/nextcloud.yaml | |
12 | - | ExecStop=podman play kube --down /path/to/nextcloud/nextcloud.yaml | |
10 | + | ExecStartPre=/path/to/nextcloud/webroot/on/host/bin/fix-htaccess | |
11 | + | ExecStart=podman play kube --replace /path/to/nextcloud.yaml | |
12 | + | ExecStop=podman play kube --down /path/to/nextcloud.yaml | |
13 | + | ## Uncomment to export named volumes after stopping the pod | |
13 | 14 | #ExecStopPost=podman volume export -o /path/to/clamav-db.tar clamav-db | |
14 | - | #ExecStopPost=podman volume export -o /path/to/nextcloud/nextcloud-psql.tar nextcloud-psql | |
15 | + | #ExecStopPost=podman volume export -o /path/to/nextcloud-psql.tar nextcloud-psql | |
15 | 16 | ||
16 | 17 | ||
17 | 18 | [Install] |
Jarno Rankinen 修订了这个 Gist . 跳至此修订
1 file changed, 18 insertions
pod-nextcloud.service(file created)
@@ -0,0 +1,18 @@ | |||
1 | + | [Unit] | |
2 | + | Description=Podman pod - Nextcloud | |
3 | + | After=network-online.target | |
4 | + | AssertPathExists=/path/to/nextcloud/webroot | |
5 | + | ||
6 | + | [Service] | |
7 | + | Type=forking | |
8 | + | Restart=on-failure | |
9 | + | RestartSec=30 | |
10 | + | ExecStartPre=/path/to/nextcloud/bin/fix-htaccess | |
11 | + | ExecStart=podman play kube --replace /path/to/nextcloud/nextcloud.yaml | |
12 | + | ExecStop=podman play kube --down /path/to/nextcloud/nextcloud.yaml | |
13 | + | #ExecStopPost=podman volume export -o /path/to/clamav-db.tar clamav-db | |
14 | + | #ExecStopPost=podman volume export -o /path/to/nextcloud/nextcloud-psql.tar nextcloud-psql | |
15 | + | ||
16 | + | ||
17 | + | [Install] | |
18 | + | WantedBy=default.target |
Jarno Rankinen 修订了这个 Gist . 跳至此修订
1 file changed, 174 insertions
nextcloud.yaml(file created)
@@ -0,0 +1,174 @@ | |||
1 | + | apiVersion: v1 | |
2 | + | kind: ConfigMap | |
3 | + | metadata: | |
4 | + | name: nextcloud-config | |
5 | + | data: | |
6 | + | POSTGRES_USER: ### POSTGRES KÄYTTÄJÄ TÄHÄN #### | |
7 | + | POSTGRES_DB: ### POSTGRES TIETOKANTA TÄHÄN ### | |
8 | + | POSTGRES_PASSWORD: ### POSTGRES SALASANA TÄHÄN ### | |
9 | + | NEXTCLOUD_ADMIN_USER: ### ADMIN-KÄYTTÄJÄ TÄHÄN ### | |
10 | + | NEXTCLOUD_ADMIN_PASSWORD: ### ADMIN-KÄYTTÄJÄN SALASANA ### | |
11 | + | NEXTCLOUD_TRUSTED_DOMAINS: ### TRUSTED DOMAINS, esim. cloud.example.com 192.168.4.5 | |
12 | + | REDIS_HOST: 127.0.0.1 | |
13 | + | REDIS_PORT: 6379 | |
14 | + | ## NÄITÄ VOI TUNKATA MYÖS ## | |
15 | + | PHP_MEMORY_LIMIT: 3G | |
16 | + | PHP_UPLOAD_LIMIT: 10G | |
17 | + | TZ: Europe/Helsinki | |
18 | + | --- | |
19 | + | apiVersion: v1 | |
20 | + | kind: Pod | |
21 | + | metadata: | |
22 | + | name: nextcloud | |
23 | + | creationTimestamp: "2022-05-25T09:38:11Z" | |
24 | + | labels: | |
25 | + | app: nextcloud | |
26 | + | annotations: | |
27 | + | spec: | |
28 | + | volumes: | |
29 | + | - hostPath: | |
30 | + | path: ## CLAMAV-CONFIG POLKU TÄHÄN ## | |
31 | + | type: Directory | |
32 | + | name: clamav-config-host-1 | |
33 | + | - hostPath: | |
34 | + | path: ## NEXTCLOUD WEB-JUUREN POLKU TÄHÄN (/var/www/nextcloud) ## | |
35 | + | type: Directory | |
36 | + | name: nextcloud-app-host-0 | |
37 | + | - hostPath: | |
38 | + | path: ## REDIS-DUMPIN POLKU TÄHÄN ## | |
39 | + | type: Directory | |
40 | + | name: nextcloud-redis-host-0 | |
41 | + | - name: clamav-db | |
42 | + | persistentVolumeClaim: | |
43 | + | claimName: clamav-db | |
44 | + | - name: nextcloud-psql | |
45 | + | persistentVolumeClaim: | |
46 | + | claimName: nextcloud-psql | |
47 | + | containers: | |
48 | + | ||
49 | + | - name: clamav | |
50 | + | image: docker.io/clamav/clamav:latest | |
51 | + | #image: ghcr.io/0ranki/clamav-docker-arm64:v1.1.0 | |
52 | + | resources: {} | |
53 | + | securityContext: | |
54 | + | capabilities: | |
55 | + | drop: | |
56 | + | - CAP_MKNOD | |
57 | + | - CAP_NET_RAW | |
58 | + | - CAP_AUDIT_WRITE | |
59 | + | volumeMounts: | |
60 | + | - mountPath: /var/lib/clamav | |
61 | + | name: clamav-db | |
62 | + | - mountPath: /etc/clamav | |
63 | + | name: clamav-config-host-1 | |
64 | + | ||
65 | + | - name: redis | |
66 | + | image: docker.io/library/redis:alpine | |
67 | + | args: | |
68 | + | - redis-server | |
69 | + | - --save | |
70 | + | - 60 | |
71 | + | - 1 | |
72 | + | - --loglevel | |
73 | + | - warning | |
74 | + | resources: {} | |
75 | + | securityContext: | |
76 | + | capabilities: | |
77 | + | drop: | |
78 | + | - CAP_MKNOD | |
79 | + | - CAP_NET_RAW | |
80 | + | - CAP_AUDIT_WRITE | |
81 | + | volumeMounts: | |
82 | + | - mountPath: /data | |
83 | + | name: nextcloud-redis-host-0 | |
84 | + | ||
85 | + | - name: psql | |
86 | + | image: docker.io/postgres:14-alpine | |
87 | + | args: | |
88 | + | - postgres | |
89 | + | command: | |
90 | + | - docker-entrypoint.sh | |
91 | + | envFrom: | |
92 | + | - configMapRef: | |
93 | + | name: nextcloud-config | |
94 | + | optional: false | |
95 | + | resources: {} | |
96 | + | securityContext: | |
97 | + | allowPrivilegeEscalation: true | |
98 | + | capabilities: | |
99 | + | drop: | |
100 | + | - CAP_MKNOD | |
101 | + | - CAP_NET_RAW | |
102 | + | - CAP_AUDIT_WRITE | |
103 | + | privileged: false | |
104 | + | readOnlyRootFilesystem: false | |
105 | + | seLinuxOptions: {} | |
106 | + | volumeMounts: | |
107 | + | - mountPath: /var/lib/postgresql/data | |
108 | + | name: nextcloud-psql | |
109 | + | workingDir: / | |
110 | + | ||
111 | + | - name: app | |
112 | + | ## Remember to change cron container version! | |
113 | + | image: ghcr.io/0ranki/nextcloud-previews/nextcloud:latest | |
114 | + | ## Remember to change cron container version! | |
115 | + | #imagePullPolicy: never | |
116 | + | ports: | |
117 | + | - containerPort: 80 | |
118 | + | hostPort: 8082 | |
119 | + | envFrom: | |
120 | + | - configMapRef: | |
121 | + | name: nextcloud-config | |
122 | + | optional: false | |
123 | + | resources: {} | |
124 | + | securityContext: | |
125 | + | capabilities: | |
126 | + | drop: | |
127 | + | - CAP_MKNOD | |
128 | + | - CAP_NET_RAW | |
129 | + | - CAP_AUDIT_WRITE | |
130 | + | volumeMounts: | |
131 | + | - mountPath: /var/www/html | |
132 | + | name: nextcloud-app-host-0 | |
133 | + | ||
134 | + | - name: cron | |
135 | + | # Remember to change main image version! | |
136 | + | image: ghcr.io/0ranki/nextcloud-previews/nextcloud:latest | |
137 | + | # Remember to change main image version! | |
138 | + | #imagePullPolicy: never | |
139 | + | args: | |
140 | + | - busybox | |
141 | + | - crond | |
142 | + | - -f | |
143 | + | - -l | |
144 | + | - 0 | |
145 | + | - -L | |
146 | + | - /dev/stdout | |
147 | + | env: | |
148 | + | - name: TZ | |
149 | + | value: Europe/Helsinki | |
150 | + | resources: {} | |
151 | + | securityContext: | |
152 | + | capabilities: | |
153 | + | drop: | |
154 | + | - CAP_MKNOD | |
155 | + | - CAP_NET_RAW | |
156 | + | - CAP_AUDIT_WRITE | |
157 | + | volumeMounts: | |
158 | + | - mountPath: /var/www/html | |
159 | + | name: nextcloud-app-host-0 | |
160 | + | ||
161 | + | # - name: cloudflared | |
162 | + | # image: docker.io/cloudflare/cloudflared:latest | |
163 | + | # args: | |
164 | + | # - tunnel | |
165 | + | # - --no-autoupdate | |
166 | + | # - run | |
167 | + | # - --token | |
168 | + | # - ### CLOUDFLARE TOKEN TÄHÄN ### | |
169 | + | # resources: {} | |
170 | + | # securityContext: {} | |
171 | + | ||
172 | + | restartPolicy: Always | |
173 | + | ||
174 | + | status: {} |