80 lines
2.1 KiB
Markdown
80 lines
2.1 KiB
Markdown
## docker-compose.yml
|
|
```yaml
|
|
version: '3'
|
|
|
|
services:
|
|
app:
|
|
image: nextcloud
|
|
ports:
|
|
- 8080:80
|
|
volumes:
|
|
- ./data:/var/www/html
|
|
restart: always
|
|
```
|
|
|
|
## config.php
|
|
Nextcloud 的 config 檔放在`/var/www/html/config/config.php`,對應到本機就是 `./data/config/config.php`,在安裝完成之後,需要修改 `trusted_domains`、`overwriteprotocol`、`overwrite.cli.url` 這幾個參數,如下:
|
|
```php
|
|
<?php
|
|
$CONFIG = array (
|
|
'htaccess.RewriteBase' => '/',
|
|
'memcache.local' => '\\OC\\Memcache\\APCu',
|
|
'apps_paths' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'path' => '/var/www/html/apps',
|
|
'url' => '/apps',
|
|
'writable' => false,
|
|
),
|
|
1 =>
|
|
array (
|
|
'path' => '/var/www/html/custom_apps',
|
|
'url' => '/custom_apps',
|
|
'writable' => true,
|
|
),
|
|
),
|
|
'memcache.distributed' => '\\OC\\Memcache\\Redis',
|
|
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
|
'redis' =>
|
|
array (
|
|
'host' => 'redis',
|
|
'password' => '',
|
|
'port' => 6379,
|
|
),
|
|
'upgrade.disable-web' => true,
|
|
'instanceid' => 'och3g4qo42hq',
|
|
'passwordsalt' => 'kASfV5cf4Rh+EcvGNKQkmK01HD2UbI',
|
|
'secret' => 'Vze6ZS+qgeOmacEn3ctbtV3uZaEpzeJDufjkkm4A9lgmUYpF',
|
|
'trusted_domains' =>
|
|
array (
|
|
0 => 'nc.awin.one',
|
|
),
|
|
'datadirectory' => '/var/www/html/data',
|
|
'dbtype' => 'mysql',
|
|
'version' => '28.0.3.2',
|
|
'dbname' => 'nextcloud',
|
|
'dbhost' => 'db',
|
|
'dbport' => '',
|
|
'dbtableprefix' => 'oc_',
|
|
'mysql.utf8mb4' => true,
|
|
'dbuser' => 'nextcloud',
|
|
'dbpassword' => 'F5vy&46Fzbn:hFnlHji.sWfS*SP~wC',
|
|
'overwriteprotocol' => 'https',
|
|
'overwrite.cli.url' => 'https://nc.awin.one',
|
|
'maintenance_window_start' => 1,
|
|
'default_phone_region' => 'TWN',
|
|
'installed' => true,
|
|
'mail_smtpmode' => 'smtp',
|
|
'mail_sendmailmode' => 'smtp',
|
|
'mail_from_address' => 'awinhuang',
|
|
'mail_domain' => 'gmail.com',
|
|
'mail_smtphost' => 'smtp.gmail.com',
|
|
'mail_smtpport' => '587',
|
|
'mail_smtpauth' => 1,
|
|
'mail_smtpname' => 'awinhuang@gmail.com',
|
|
'mail_smtppassword' => 'stcg ozpc ypsl enbp',
|
|
'maintenance' => false,
|
|
'loglevel' => 2,
|
|
);
|
|
``` |