services: planka: image: ghcr.io/plankanban/planka:latest restart: on-failure volumes: - data:/app/data # - ./terms:/app/terms/custom # Optionally override this to your user/group. The image is built for uid # 1000; any other uid needs group 0, which is what Docker uses when only a # uid is given, and the volume above has to be owned by that uid. # user: 1000:1000 # tmpfs: # - /app/.tmp:mode=770,uid=1000,gid=1000 ports: - 3000:1337 environment: - BASE_URL=http://localhost:3000 - DATABASE_URL=postgresql://postgres@postgres/planka # Optionally store the database password in secrets: # - DATABASE_URL=postgresql://postgres:$${DATABASE_PASSWORD}@postgres/planka # - DATABASE_PASSWORD__FILE=/run/secrets/database_password # And add the following to the service: # secrets: # - database_password # Or store the whole connection string - then DATABASE_URL should not be set # - DATABASE_URL__FILE=/run/secrets/database_url # Anything in the user name or password that is special in a URL has to be # percent-encoded: / as %2F, \ as %5C, : as %3A, @ as %40, % as %25. # The schema PLANKA lives in. It must already exist, and the database user # must be able to create tables in it. Defaults to the connection's own # search path, which is usually public. # - DATABASE_SCHEMA=planka # REPLACE THIS. Every access token is signed with it, so leaving the # published example value means anyone can mint a token for any account # on this instance. Generate one with: openssl rand -hex 32 # PLANKA warns about this on every start until you change it. - SECRET_KEY=notsecretkey # Optionally store in secrets - then SECRET_KEY should not be set # - SECRET_KEY__FILE=/run/secrets/secret_key # - LOG_LEVEL=warn # - TRUST_PROXY=true # - MAX_UPLOAD_FILE_SIZE= # - TOKEN_EXPIRES_IN=365 # In days # - STORAGE_LIMIT= # - ACTIVE_USERS_LIMIT= # TLS is configured in DATABASE_URL and applies to the app and to the # migrations alike, e.g. # - DATABASE_URL=postgresql://postgres@postgres/planka?sslmode=verify-full&sslrootcert=/run/secrets/ca.pem # PGSSLMODE is still read when the connection string says nothing about TLS. # Accept a certificate that cannot be verified. Prefer sslrootcert above, # which trusts your own CA instead of trusting anything. # - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false # The default application language used as a fallback when a user's language is not set. # This language is also used for per-board notifications. # - DEFAULT_LANGUAGE=en-US # Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted # - DEFAULT_ADMIN_EMAIL=demo@demo.demo # - DEFAULT_ADMIN_PASSWORD=demo # Optionally store in secrets - then DEFAULT_ADMIN_PASSWORD should not be set # - DEFAULT_ADMIN_PASSWORD__FILE=/run/secrets/default_admin_password # - DEFAULT_ADMIN_NAME=Demo Demo # - DEFAULT_ADMIN_USERNAME=demo # Set to true to show more detailed authentication error messages. # It should not be enabled without a rate limiter for security reasons. # - SHOW_DETAILED_AUTH_ERRORS=false # All outgoing HTTP requests (SMTP, webhooks, Apprise notifications, favicon fetching, etc.) # will be sent through this proxy if set. # If commented out, an internal Squid proxy will be started inside the container, # which you can control via OUTGOING_BLOCKED_* and OUTGOING_ALLOWED_* below. # - OUTGOING_PROXY=http://proxy:3128 # Set to true to expose the Swagger specification at /swagger.json # - SWAGGER_EXPOSED=false # - S3_ENDPOINT= # - S3_REGION= # - S3_ACCESS_KEY_ID= # - S3_SECRET_ACCESS_KEY= # Optionally store in secrets - then S3_SECRET_ACCESS_KEY should not be set # - S3_SECRET_ACCESS_KEY__FILE=/run/secrets/s3_secret_access_key # - S3_BUCKET= # - S3_FORCE_PATH_STYLE=true # - S3_REQUEST_CHECKSUM_CALCULATION= # Email Notifications (https://nodemailer.com/smtp/) # These values override and disable configuration in the UI if set. # - SMTP_HOST= # - SMTP_PORT=587 # - SMTP_NAME= # - SMTP_SECURE=true # - SMTP_TLS_REJECT_UNAUTHORIZED=false # - SMTP_USER= # - SMTP_PASSWORD= # Optionally store in secrets - then SMTP_PASSWORD should not be set # - SMTP_PASSWORD__FILE=/run/secrets/smtp_password # - SMTP_FROM="Demo Demo" # Using Gravatar directly exposes user IPs and hashed emails to a third party (GDPR risk). # Use a proxy you control for privacy, or leave commented out or empty to disable. # - GRAVATAR_BASE_URL=https://www.gravatar.com/avatar/ # -------------------------------------------------------------------- # Outgoing traffic control (internal Squid proxy) # -------------------------------------------------------------------- # These rules also apply to Apprise notification services that do not use HTTP # (email, syslog, IRC, etc.). For those, hostnames are resolved once at start, # so a leading dot (subdomain matching) is not supported there. # These IPs/hostnames will always be blocked (highest priority) # - OUTGOING_BLOCKED_IPS= # - OUTGOING_BLOCKED_HOSTS=localhost,postgres # Only these IPs/hostnames will be reachable # - OUTGOING_ALLOWED_IPS= # - OUTGOING_ALLOWED_HOSTS= depends_on: postgres: condition: service_healthy postgres: image: postgres:16-alpine restart: on-failure volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d planka"] interval: 10s timeout: 5s retries: 5 volumes: data: db-data: