v_11
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
# =============================================================================
|
||||
# Vikunja – environment variables
|
||||
# Copy this file to .env and fill in real values. The .env file is read
|
||||
# automatically by "docker compose" in the same directory.
|
||||
# =============================================================================
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 1. Core / Service
|
||||
# -----------------------------------------------------------------------------
|
||||
# The URL browsers will use to reach Vikunja (no trailing slash).
|
||||
# This is mandatory when CORS is enabled (the default).
|
||||
PUBLIC_URL=http://localhost:3456
|
||||
|
||||
# A long, random secret used to sign JWT tokens.
|
||||
# Generate one with: openssl rand -hex 32
|
||||
JWT_SECRET=REPLACE_ME_WITH_A_RANDOM_64_CHAR_HEX_STRING
|
||||
|
||||
# IANA tz name – e.g. Europe/Lisbon, America/New_York, Asia/Tokyo
|
||||
TIMEZONE=Europe/Lisbon
|
||||
|
||||
# Set to "false" after you have created all desired user accounts.
|
||||
ENABLE_REGISTRATION=true
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 2. PostgreSQL
|
||||
# -----------------------------------------------------------------------------
|
||||
DB_USER=vikunja
|
||||
DB_PASSWORD=REPLACE_WITH_A_STRONG_PASSWORD
|
||||
DB_NAME=vikunja
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 3. SMTP / Mailer
|
||||
# -----------------------------------------------------------------------------
|
||||
# --- Host & port ------------------------------------------------------------
|
||||
# Common presets:
|
||||
# Gmail smtp.gmail.com 587 (STARTTLS) or 465 (SSL)
|
||||
# Outlook/M365 smtp-auth.outlook.com 587
|
||||
# Postfix (local) 127.0.0.1 25 (set SMTP_FORCE_SSL=false, AUTH=none)
|
||||
# Mailgun smtp.mailgun.org 587
|
||||
# Custom/self your.smtp.server 587
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
|
||||
# --- Credentials ------------------------------------------------------------
|
||||
# For Gmail with 2-FA enabled, use an *App Password*, not your real password.
|
||||
SMTP_USER=your-email@gmail.com
|
||||
SMTP_PASSWORD=REPLACE_WITH_APP_OR_REAL_PASSWORD
|
||||
|
||||
# --- Sender address ---------------------------------------------------------
|
||||
# The "From:" field in outgoing mails. Many providers require this to match
|
||||
# SMTP_USER or an authorised alias.
|
||||
SMTP_FROM=your-email@gmail.com
|
||||
|
||||
# --- TLS / SSL options ------------------------------------------------------
|
||||
# SMTP_FORCE_SSL – wraps the connection in TLS immediately on connect.
|
||||
# • true → typically paired with port 465 (implicit TLS / SMTPS)
|
||||
# • false → expects STARTTLS on port 587 (or plain on 25)
|
||||
SMTP_FORCE_SSL=false
|
||||
|
||||
# SMTP_SKIP_TLS_VERIFY – skip server-certificate validation.
|
||||
# Set to true ONLY if you use a self-signed certificate.
|
||||
SMTP_SKIP_TLS_VERIFY=false
|
||||
|
||||
# SMTP_AUTH_TYPE – authentication method the SMTP server expects:
|
||||
# plain – username + password in a single base64 blob (default)
|
||||
# login – username and password sent in two separate challenges
|
||||
# none – no authentication (e.g. local Postfix accepting anonymous relay)
|
||||
SMTP_AUTH_TYPE=plain
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 4. Optional – host-side port mapping
|
||||
# -----------------------------------------------------------------------------
|
||||
# The port exposed on the Docker host (maps to container port 3456).
|
||||
# Leave empty to default to 3456.
|
||||
HOST_PORT=3456
|
||||
@@ -0,0 +1,98 @@
|
||||
# =============================================================================
|
||||
# Vikunja — Docker Compose with PostgreSQL + SMTP e-mail support
|
||||
# =============================================================================
|
||||
# Before starting the stack run:
|
||||
#
|
||||
# mkdir -p ./files ./db
|
||||
# chown 1000:1000 ./files # Vikunja runs as UID 1000
|
||||
# chown 999:999 ./db # PostgreSQL runs as UID 999
|
||||
#
|
||||
# (On some systems you may need: sudo chown -R 999:999 ./db)
|
||||
#
|
||||
# Then copy .env.example → .env and fill in every value.
|
||||
# Start with: docker compose up -d
|
||||
# Test mailer: docker compose exec vikunja /app/vikunja/vikunja testmail <address>
|
||||
# =============================================================================
|
||||
|
||||
services:
|
||||
# ---------------------------------------------------------------------------
|
||||
# PostgreSQL database
|
||||
# ---------------------------------------------------------------------------
|
||||
db:
|
||||
image: postgres:18
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
user: "999:999" # PostgreSQL official image default UID/GID
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
volumes:
|
||||
# PostgreSQL 18+ requires mounting at /var/lib/postgresql (not /data subfolder)
|
||||
# Data will be stored in ./db/18/data automatically
|
||||
- ./db:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -h localhost -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Vikunja (API + frontend in one container)
|
||||
# ---------------------------------------------------------------------------
|
||||
vikunja:
|
||||
image: vikunja/vikunja:latest
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
# The container defaults to UID 1000 / no group.
|
||||
# Adjust if your host folders need a different owner.
|
||||
# user: "1000:1000"
|
||||
ports:
|
||||
- "${HOST_PORT:-3456}:3456"
|
||||
volumes:
|
||||
- ./files:/app/vikunja/files # uploaded / generated files
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy # wait for postgres to be ready
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Environment — all sensitive values come from .env
|
||||
# -----------------------------------------------------------------------
|
||||
environment:
|
||||
# --- Core service -------------------------------------------------------
|
||||
VIKUNJA_SERVICE_PUBLICURL: ${PUBLIC_URL}
|
||||
VIKUNJA_SERVICE_JWTSECRET: ${JWT_SECRET}
|
||||
VIKUNJA_SERVICE_TIMEZONE: ${TIMEZONE:-UTC}
|
||||
VIKUNJA_SERVICE_ENABLEREGISTRATION: ${ENABLE_REGISTRATION:-true}
|
||||
VIKUNJA_SERVICE_ENABLETASKATTACHMENTS: "true"
|
||||
VIKUNJA_SERVICE_ENABLEEMAILREMINDERS: "true"
|
||||
|
||||
# --- Database ------------------------------------------------------------
|
||||
VIKUNJA_DATABASE_TYPE: postgres
|
||||
VIKUNJA_DATABASE_HOST: db
|
||||
VIKUNJA_DATABASE_USER: ${DB_USER}
|
||||
VIKUNJA_DATABASE_PASSWORD: ${DB_PASSWORD}
|
||||
VIKUNJA_DATABASE_DATABASE: ${DB_NAME}
|
||||
VIKUNJA_DATABASE_SSLMODE: disable # set to 'require' if TLS is enabled on PG
|
||||
|
||||
# --- SMTP / Mailer -------------------------------------------------------
|
||||
# When VIKUNJA_MAILER_ENABLED is true Vikunja sends:
|
||||
# • registration confirmation mails
|
||||
# • password-reset mails
|
||||
# • task-reminder mails (when ENABLEEMAILREMINDERS is also true)
|
||||
VIKUNJA_MAILER_ENABLED: "true"
|
||||
VIKUNJA_MAILER_HOST: ${SMTP_HOST}
|
||||
VIKUNJA_MAILER_PORT: ${SMTP_PORT:-587}
|
||||
VIKUNJA_MAILER_USERNAME: ${SMTP_USER}
|
||||
VIKUNJA_MAILER_PASSWORD: ${SMTP_PASSWORD}
|
||||
VIKUNJA_MAILER_FROMEMAIL: ${SMTP_FROM}
|
||||
VIKUNJA_MAILER_FORCESSL: ${SMTP_FORCE_SSL:-true} # wraps the connection in TLS from the start (use with port 465)
|
||||
VIKUNJA_MAILER_SKIPTLSVERIFY: ${SMTP_SKIP_TLS_VERIFY:-false} # set true only for self-signed certs
|
||||
VIKUNJA_MAILER_AUTHTYPE: ${SMTP_AUTH_TYPE:-plain} # plain | login | none
|
||||
|
||||
# --- CORS (required when frontend & API share the same origin) ----------
|
||||
VIKUNJA_CORS_ENABLE: "true"
|
||||
VIKUNJA_CORS_ORIGINS: ${PUBLIC_URL}
|
||||
@@ -0,0 +1,75 @@
|
||||
# =============================================================================
|
||||
# Vikunja – environment variables
|
||||
# Copy this file to .env and fill in real values. The .env file is read
|
||||
# automatically by "docker compose" in the same directory.
|
||||
# =============================================================================
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 1. Core / Service
|
||||
# -----------------------------------------------------------------------------
|
||||
# The URL browsers will use to reach Vikunja (no trailing slash).
|
||||
# This is mandatory when CORS is enabled (the default).
|
||||
PUBLIC_URL=http://localhost:3456
|
||||
|
||||
# A long, random secret used to sign JWT tokens.
|
||||
# Generate one with: openssl rand -hex 32
|
||||
JWT_SECRET=REPLACE_ME_WITH_A_RANDOM_64_CHAR_HEX_STRING
|
||||
|
||||
# IANA tz name – e.g. Europe/Lisbon, America/New_York, Asia/Tokyo
|
||||
TIMEZONE=Europe/Lisbon
|
||||
|
||||
# Set to "false" after you have created all desired user accounts.
|
||||
ENABLE_REGISTRATION=true
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 2. PostgreSQL
|
||||
# -----------------------------------------------------------------------------
|
||||
DB_USER=vikunja
|
||||
DB_PASSWORD=REPLACE_WITH_A_STRONG_PASSWORD
|
||||
DB_NAME=vikunja
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 3. SMTP / Mailer
|
||||
# -----------------------------------------------------------------------------
|
||||
# --- Host & port ------------------------------------------------------------
|
||||
# Common presets:
|
||||
# Gmail smtp.gmail.com 587 (STARTTLS) or 465 (SSL)
|
||||
# Outlook/M365 smtp-auth.outlook.com 587
|
||||
# Postfix (local) 127.0.0.1 25 (set SMTP_FORCE_SSL=false, AUTH=none)
|
||||
# Mailgun smtp.mailgun.org 587
|
||||
# Custom/self your.smtp.server 587
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
|
||||
# --- Credentials ------------------------------------------------------------
|
||||
# For Gmail with 2-FA enabled, use an *App Password*, not your real password.
|
||||
SMTP_USER=your-email@gmail.com
|
||||
SMTP_PASSWORD=REPLACE_WITH_APP_OR_REAL_PASSWORD
|
||||
|
||||
# --- Sender address ---------------------------------------------------------
|
||||
# The "From:" field in outgoing mails. Many providers require this to match
|
||||
# SMTP_USER or an authorised alias.
|
||||
SMTP_FROM=your-email@gmail.com
|
||||
|
||||
# --- TLS / SSL options ------------------------------------------------------
|
||||
# SMTP_FORCE_SSL – wraps the connection in TLS immediately on connect.
|
||||
# • true → typically paired with port 465 (implicit TLS / SMTPS)
|
||||
# • false → expects STARTTLS on port 587 (or plain on 25)
|
||||
SMTP_FORCE_SSL=false
|
||||
|
||||
# SMTP_SKIP_TLS_VERIFY – skip server-certificate validation.
|
||||
# Set to true ONLY if you use a self-signed certificate.
|
||||
SMTP_SKIP_TLS_VERIFY=false
|
||||
|
||||
# SMTP_AUTH_TYPE – authentication method the SMTP server expects:
|
||||
# plain – username + password in a single base64 blob (default)
|
||||
# login – username and password sent in two separate challenges
|
||||
# none – no authentication (e.g. local Postfix accepting anonymous relay)
|
||||
SMTP_AUTH_TYPE=plain
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 4. Optional – host-side port mapping
|
||||
# -----------------------------------------------------------------------------
|
||||
# The port exposed on the Docker host (maps to container port 3456).
|
||||
# Leave empty to default to 3456.
|
||||
HOST_PORT=3456
|
||||
Reference in New Issue
Block a user