威联通QNAP Nas 搭建Gitea代码托管平台

1. 安装Gitea镜像 qnap Container Station - 创建 - 创建应用程序(yaml文件, 与docker compose文件建立docker container完全相同) version: '3.3' services: gitea_db: image: mysql:5.7 container_name: gitea_db restart: always environment: MYSQL_DATABASE: gitea MYSQL_ROOT_PASSWORD: [mysql root password] MYSQL_USER: gitea MYSQL_PASSWORD: [mysql root password] volumes: - db_data:/var/lib/mysql_gitea ports: - "[host sql port for sql container]:3306" networks: - gitea-network gitea_app: depends_on: - gitea_db image: gitea/gitea container_name: gitea_app restart: always ports: - "[host ssh port for gitea container]:22" - "[host http port for gitea container]:3000" volumes: - [gitea config and data path in nas]:/data networks: - gitea-network volumes: db_data: app_data: networks: gitea-network: driver: "bridge" 1.1. gitea install配置参考 如果sql服务器中没有保存以前的gitea配置, 首次打开gitea页面会显示安装配置 ...

2023年3月27日 · 2 分钟 · sun510001

威联通QNAP Nas 相关问题

Nas静音 威联通Nas买来之后每天3点都会自动开始一些计划任务, 关闭后晚上安静不少 关于计划任务的说明和操作在这里 Add items to crontab # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; # │ │ │ │ │ 7 is also Sunday on some systems) # │ │ │ │ │ # │ │ │ │ │ # * * * * * <command to execute> 问题是执行sudo crontab /etc/config/crontab && sudo /etc/init.d/crond.sh restart 命令之后, 一些任务又会自动重置 0 3 * * * /sbin/vs_refresh 4 3 * * 3 /etc/init.d/backup_conf.sh 解决方法: 问题出在/etc/init.d/crond.sh 上, 修改之 ############# # 46行 echo "0 3 * * * /sbin/vs_refresh" >> /etc/config/crontab # 或者新版 46行 local time=$(/sbin/getcfg vs_refresh schedule -d '13:0') ############ # 88-97行 1) #once a day echo "4 13 * * * /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; 30) #once a month echo "4 13 3 * * /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; 7) #once a week echo "4 13 * * 3 /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; *) #for testing echo "*/3 * * * * /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; 重启nas可能会重置设置 需注意. ...

2022年11月16日 · 3 分钟 · sun510001