From 37b6f6820ee2a008da7f702e4e456be7bfffed59 Mon Sep 17 00:00:00 2001 From: Stavros Date: Fri, 8 Sep 2023 21:44:04 +0300 Subject: [PATCH] Fix vikunja. (#1165) --- apps/vikunja/config.json | 11 +++--- apps/vikunja/data/proxy/nginx.conf | 28 +++++--------- apps/vikunja/docker-compose.yml | 59 ++++++++++++++---------------- 3 files changed, 42 insertions(+), 56 deletions(-) diff --git a/apps/vikunja/config.json b/apps/vikunja/config.json index 2b41726e..6bff27be 100644 --- a/apps/vikunja/config.json +++ b/apps/vikunja/config.json @@ -5,9 +5,11 @@ "exposable": true, "port": 8135, "id": "vikunja", - "tipi_version": 5, + "tipi_version": 6, "version": "0.21.0", - "categories": ["utilities"], + "categories": [ + "utilities" + ], "description": "The Todo-app to organize your life.", "short_desc": "The Todo-app to organize your life.", "author": "kolaente", @@ -17,13 +19,12 @@ { "type": "random", "label": "Vikunja database password", - "random": true, "env_variable": "VIKUNJA_DB_PASSWORD" }, { "type": "random", - "label": "Vikunja jwt secret", - "env_variable": "VIKUNJA_SERVICE_JWTSECRET" + "label": "Vikunja secret", + "env_variable": "VIKUNJA_SERVICE_SECRET" } ] } diff --git a/apps/vikunja/data/proxy/nginx.conf b/apps/vikunja/data/proxy/nginx.conf index b28829f8..3eac7dc7 100644 --- a/apps/vikunja/data/proxy/nginx.conf +++ b/apps/vikunja/data/proxy/nginx.conf @@ -1,21 +1,11 @@ -worker_processes 1; +server { + listen 80; -error_log /var/log/nginx/error.log debug; - -events { - worker_connections 1024; -} - -http { - server { - listen 80; - - location / { - proxy_pass http://vikunja-frontend:80; - } - location ~* ^/(api|dav|\.well-known)/ { - proxy_pass http://vikunja-api:3456; - client_max_body_size 20M; - } + location / { + proxy_pass http://vikunja:80; + } + + location ~* ^/(api|dav|\.well-known)/ { + proxy_pass http://vikunja-api:3456; + client_max_body_size 20M; } -} \ No newline at end of file diff --git a/apps/vikunja/docker-compose.yml b/apps/vikunja/docker-compose.yml index 97ce3fd9..4a37759e 100644 --- a/apps/vikunja/docker-compose.yml +++ b/apps/vikunja/docker-compose.yml @@ -1,34 +1,5 @@ version: "3.7" - services: - vikunja: - depends_on: - - vikunja-api - container_name: vikunja - image: vikunja/frontend:0.21.0 - restart: unless-stopped - networks: - - tipi_main_network - - vikunja-api: - container_name: vikunja-api - image: vikunja/api:0.21.0 - environment: - VIKUNJA_DATABASE_HOST: vikunja-db - VIKUNJA_DATABASE_PASSWORD: ${VIKUNJA_DB_PASSWORD} - VIKUNJA_DATABASE_TYPE: postgres - VIKUNJA_DATABASE_USER: tipi - VIKUNJA_SERVICE_JWTSECRET: ${VIKUNJA_SERVICE_JWTSECRET} - VIKUNJA_SERVICE_FRONTENDURL: ${APP_PROTOCOL:-http}://${APP_DOMAIN}/ - volumes: - - ${APP_DATA_DIR}/data/files:/app/vikunja/files - restart: unless-stopped - depends_on: - vikunja-db: - condition: service_healthy - networks: - - tipi_main_network - vikunja-db: container_name: vikunja-db image: postgres:14 @@ -45,14 +16,38 @@ services: retries: 5 networks: - tipi_main_network - - vikunja-proxy: + vikunja-api: + container_name: vikunja-api + image: vikunja/api:0.21.0 + environment: + VIKUNJA_DATABASE_HOST: vikunja-db + VIKUNJA_DATABASE_PASSWORD: ${VIKUNJA_DB_PASSWORD} + VIKUNJA_DATABASE_TYPE: postgres + VIKUNJA_DATABASE_USER: tipi + VIKUNJA_DATABASE_DATABASE: vikunja + VIKUNJA_SERVICE_JWTSECRET: ${VIKUNJA_SERVICE_SECRET} + VIKUNJA_SERVICE_FRONTENDURL: ${APP_PROTOCOL:-http}://${APP_DOMAIN}/ + volumes: + - ${APP_DATA_DIR}/data/files:/app/vikunja/files + restart: unless-stopped + depends_on: + vikunja-db: + condition: service_healthy + networks: + - tipi_main_network + vikunja: + image: vikunja/frontend:0.21.0 + restart: unless-stopped container_name: vikunja + networks: + - tipi_main_network + vikunja-proxy: image: nginx + container_name: vikunja-proxy ports: - ${APP_PORT}:80 volumes: - - ${APP_DATA_DIR}/data/proxy/nginx.conf:/etc/nginx/nginx.conf:ro + - ${APP_DATA_DIR}/data/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - vikunja-api - vikunja