The cron has been silently failing every day since 2026-03-28. Four independent bugs were stacked: 1. cron/entrypoint.sh: env dump used `sed` to wrap each line in `export `, but values with spaces (e.g. GIT_SSH_COMMAND, OIDC_SCOPES) produced lines like `export GIT_SSH_COMMAND=ssh -o UserKnownHosts...` which `export` parses as a flag and aborts. busybox ash treats the builtin error as fatal, so `. /etc/environment.sh; script.sh` never reaches the script. Now single-quote each value with proper escaping. 2. cron/Dockerfile: NODE_PATH only works for CommonJS `require()`, not ESM `import`. The export script is `"type": "module"` and failed with "Cannot find package 'gray-matter'". Install deps at /app/node_modules instead — Node ESM walks up from /app/scripts and finds it there. 3. docker-compose.yml: `~/.ssh:/root/.ssh:ro` — DokPloy does NOT expand `~`, so it created a literal `~` directory inside the deployment dir and mounted that empty dir. The container had no SSH key. Use the absolute host path `/root/.ssh` instead. 4. cron/entrypoint.sh: even with the SSH key, `git push` would fail because the git remote is HTTPS and the host's git server runs on port 2222 (set in /root/.ssh/config). Add a `pushInsteadOf` rewrite so push uses SSH while DokPloy can keep fetching via HTTPS, and stop re-running ssh-keyscan against the wrong port — copy the host's known_hosts (which already has the :2222 entry) instead.
103 lines
2.1 KiB
YAML
103 lines
2.1 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- outline
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
networks:
|
|
- default
|
|
- dokploy-network
|
|
|
|
outline:
|
|
image: docker.getoutline.com/outlinewiki/outline:1.6.1
|
|
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
- outline-storage:/var/lib/outline/data
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: outline
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: outline
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
command:
|
|
- "postgres"
|
|
- "-c"
|
|
- "shared_buffers=128MB"
|
|
- "-c"
|
|
- "max_connections=20"
|
|
- "-c"
|
|
- "work_mem=4MB"
|
|
- "-c"
|
|
- "maintenance_work_mem=64MB"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U outline"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
|
|
restart: unless-stopped
|
|
command: >
|
|
redis-server
|
|
--maxmemory 64mb
|
|
--maxmemory-policy allkeys-lru
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
cron:
|
|
build:
|
|
context: .
|
|
dockerfile: cron/Dockerfile
|
|
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- postgres
|
|
volumes:
|
|
- ./scripts:/app/scripts:ro
|
|
- ./content:/app/content
|
|
- ./.git:/app/.git
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
# Absolute path required: DokPloy does NOT expand ~ and would otherwise
|
|
# create a literal "~" directory under the deployment dir.
|
|
- /root/.ssh:/root/.ssh:ro
|
|
- ./backups:/backups/outline
|
|
env_file:
|
|
- .env
|
|
|
|
networks:
|
|
dokploy-network:
|
|
external: true
|
|
|
|
volumes:
|
|
outline-storage:
|
|
name: code_outline-storage
|
|
external: true
|
|
postgres-data:
|
|
name: code_postgres-data
|
|
external: true
|
|
redis-data:
|
|
name: code_redis-data
|
|
external: true
|