From ae8fb341c9923aaadd14f298bb4e8fa544c0090d Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Fri, 8 Jul 2022 00:19:17 +0200 Subject: [PATCH] init --- .env.sample | 8 +++++ .gitignore | 1 + README.md | 24 ++++++++++++++ compose.yml | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 126 insertions(+) create mode 100644 .env.sample create mode 100644 .gitignore create mode 100644 README.md create mode 100644 compose.yml diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..fbfeffb --- /dev/null +++ b/.env.sample @@ -0,0 +1,8 @@ +TYPE=vikunja + +DOMAIN=vikunja.example.com + +## Domain aliases +#EXTRA_DOMAINS=', `www.vikunja.example.com`' + +LETS_ENCRYPT_ENV=production diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a6353d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.envrc diff --git a/README.md b/README.md new file mode 100644 index 0000000..11e1a7e --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# vikunja + +> One line description of the recipe + + + +* **Category**: Apps +* **Status**: 0 +* **Image**: [`vikunja`](https://hub.docker.com/r/vikunja), 4, upstream +* **Healthcheck**: No +* **Backups**: No +* **Email**: No +* **Tests**: No +* **SSO**: No + + + +## Quick start + +* `abra app new vikunja --secrets` +* `abra app config ` +* `abra app deploy ` + +For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech). diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..2f87015 --- /dev/null +++ b/compose.yml @@ -0,0 +1,93 @@ +--- +version: "3.8" + +services: + api: + image: vikunja/api + environment: + VIKUNJA_DATABASE_HOST: db + VIKUNJA_DATABASE_PASSWORD: secret + VIKUNJA_DATABASE_TYPE: postgres + VIKUNJA_DATABASE_USER: vikunja + VIKUNJA_DATABASE_DATABASE: vikunja + VIKUNJA_REDIS_ENABLED: 1 + VIKUNJA_REDIS_HOST: 'redis:6379' + VIKUNJA_CACHE_ENABLED: 1 + VIKUNJA_CACHE_TYPE: redis + volumes: + - files:/app/vikunja/files + networks: + - proxy + - internal + deploy: + restart_policy: + condition: on-failure + labels: + - "traefik.enable=true" + - "traefik.http.services.${STACK_NAME}_api.loadbalancer.server.port=3456" + - "traefik.http.routers.${STACK_NAME}_api.rule=Host(`${DOMAIN}`) && PathPrefix(`/api/v1`, `/dav/`, `/.well-known/`)" + - "traefik.http.routers.${STACK_NAME}_api.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}_api.tls.certresolver=${LETS_ENCRYPT_ENV}" + # healthcheck: + # test: ["CMD", "curl", "-f", "http://localhost:3456"] + # interval: 30s + # timeout: 10s + # retries: 10 + # start_period: 1m + + app: + image: vikunja/frontend + networks: + - proxy + deploy: + restart_policy: + condition: on-failure + labels: + - "traefik.enable=true" + - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80" + - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" + - "coop-cloud.${STACK_NAME}.version=" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost"] + interval: 30s + timeout: 10s + retries: 10 + start_period: 1m + + redis: + image: redis + networks: + - internal + + db: + image: postgres:13 + environment: + POSTGRES_PASSWORD: secret + POSTGRES_USER: vikunja + POSTGRES_DB: vikunja + volumes: + - db:/var/lib/postgresql/data + healthcheck: + test: ["CMD", "pg_isready", "-U", "vikunja"] + networks: + - internal + deploy: + restart_policy: + condition: on-failure + labels: + backupbot.backup: "true" + backupbot.backup.pre-hook: "mkdir -p /tmp/backup/ && PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup/backup.sql" + backupbot.backup.post-hook: "rm -rf /tmp/backup" + backupbot.backup.path: "/tmp/backup/" + + +volumes: + files: + db: + +networks: + proxy: + external: true + internal: