vicalloy / outline-docker-compose

Install a self-hosted Outline wiki instance in a couple of minutes
BSD 3-Clause "New" or "Revised" License
770 stars 132 forks source link

请问如何修改时区? #29

Closed JosephusZhou closed 2 years ago

JosephusZhou commented 2 years ago

config.sh中修改TIME_ZONE=UTC+8后,wk-oidc-server启动失败

vicalloy commented 2 years ago

参考 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 给出的时区。 你应当设置成 Asia/Shanghai

xuchunqiu commented 1 year ago

https://github.com/vicalloy/outline-docker-compose/blob/dd89d4516c444c69041a62548adf101910bb156f/scripts/config.sh.sample#L8-L9

我尝试在这个维基百科的表格里搜索缺省的 UTC,发现它在 TZ identifierTime zone abbreviation 列都有出现,这让我不确定应该选哪一列的其他值。我尝试了 Time zone abbreviation 列对应上海的 CST,然后运行 make install 的现象如下:

# make install
cd ./scripts && bash ./main.sh init_cfg
docker compose up -d
[+] Running 7/7
 ✔ Container outline-docker-compose-wk-redis-1          Running                                                                                                                                        0.0s
 ✔ Container outline-docker-compose-wk-postgres-1       Running                                                                                                                                        0.0s
 ✔ Container outline-docker-compose-wk-minio-1          Running                                                                                                                                        0.0s
 ✔ Container outline-docker-compose-wk-createbuckets-1  Started                                                                                                                                        1.1s
 ✔ Container outline-docker-compose-wk-outline-1        Running                                                                                                                                        0.0s
 ✔ Container outline-docker-compose-wk-nginx-1          Running                                                                                                                                        0.0s
 ✔ Container outline-docker-compose-wk-oidc-server-1    Started                                                                                                                                        0.0s
cd ./scripts && bash ./main.sh reload_nginx
2023/07/13 05:09:58 [emerg] 85#85: host not found in upstream "wk-oidc-server" in /etc/nginx/conf.d/default.conf:26
nginx: [emerg] host not found in upstream "wk-oidc-server" in /etc/nginx/conf.d/default.conf:26
waiting nginx
2023/07/13 05:09:59 [emerg] 91#91: host not found in upstream "wk-oidc-server" in /etc/nginx/conf.d/default.conf:26
nginx: [emerg] host not found in upstream "wk-oidc-server" in /etc/nginx/conf.d/default.conf:26
waiting nginx
(不断循环)

原来是要用 TZ identifier 列啊

参考 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 给出的时区。 你应当设置成 Asia/Shanghai