部署 Vikunja 支持很多种安装方式,作为 Docker 的忠实用户,杜老师分享四个 docker-compose.yml
配置文件,区别是所使用的数据库不同,以下是 MariaDB 作为数据库的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 version: '3' services: vikunja: image: vikunja/vikunja environment: VIKUNJA_SERVICE_PUBLICURL: http: VIKUNJA_DATABASE_HOST: db VIKUNJA_DATABASE_PASSWORD: changeme VIKUNJA_DATABASE_TYPE: mysql VIKUNJA_DATABASE_USER: vikunja VIKUNJA_DATABASE_DATABASE: vikunja VIKUNJA_SERVICE_JWTSECRET: <a super secure random secret> ports: - 3456 :3456 volumes: - ./files:/app/ vikunja/files depends_on: db: condition: service_healthy restart: unless-stopped db: image: mariadb:10 command: --character-set-server = utf8mb4 --collation-server = utf8mb4_unicode_ci environment: MYSQL_ROOT_PASSWORD: supersecret MYSQL_USER: vikunja MYSQL_PASSWORD: changeme MYSQL_DATABASE: vikunja volumes: - ./db:/var/ lib/mysql restart: unless-stopped healthcheck: test: ["CMD-SHELL" , "mysqladmin ping -h localhost -u $$MYSQL_USER --password=$$MYSQL_PASSWORD" ] interval: 2 s start_period: 30 s
以下是 PostgreSQL 作为数据库的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 version: '3' services: vikunja: image: vikunja/vikunja environment: VIKUNJA_SERVICE_PUBLICURL: http: VIKUNJA_DATABASE_HOST: db VIKUNJA_DATABASE_PASSWORD: changeme VIKUNJA_DATABASE_TYPE: postgres VIKUNJA_DATABASE_USER: vikunja VIKUNJA_DATABASE_DATABASE: vikunja VIKUNJA_SERVICE_JWTSECRET: <a super secure random secret> ports: - 3456 :3456 volumes: - ./files:/app/ vikunja/files depends_on: db: condition: service_healthy restart: unless-stopped db: image: postgres:16 environment: POSTGRES_PASSWORD: changeme POSTGRES_USER: vikunja volumes: - ./db:/var/ lib/postgresql/ data restart: unless-stopped healthcheck: test: ["CMD-SHELL" , "pg_isready -h localhost -U $$POSTGRES_USER" ] interval: 2 s
如果仅是个人使用,没有那么大数据量,可考虑使用 SQLite:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 vikunja : image : vikunja/vikunja environment : VIKUNJA_SERVICE_JWTSECRET : <a super secure random secret> VIKUNJA_SERVICE_PUBLICURL : http://<your public frontend url with slash>/ VIKUNJA_DATABASE_PATH : /db/vikunja.db ports : - 3456:3456 volumes : - ./files:/app/vikunja/files - ./db:/db restart : unless-stopped
Vikunja 支持将数据存放在 Redis,配置如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 version : '3' services : vikunja : image : vikunja/vikunja environment : VIKUNJA_REDIS_ENABLED : 1 VIKUNJA_REDIS_HOST : 'redis:6379' VIKUNJA_CACHE_ENABLED : 1 VIKUNJA_CACHE_TYPE : redis volumes : - ./files:/app/vikunja/files redis : image : redis
终端 Vikunja 除了 Web 端外,还有其它平台终端。为了方便小伙伴们获取,杜老师已经把所有平台的 APP 转存到了网盘:
下载地址
条评论