outline
· 1.9 KiB · Text
原始文件
services:
postgres:
image: postgres:18
container_name: Outline-DB
user: 1026:100
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/outline/db:/var/lib/postgresql/:rw
environment:
POSTGRES_DB: outline
POSTGRES_USER: outlineuser
POSTGRES_PASSWORD: outlinepass
restart: on-failure:5
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "outline", "-U", "outlineuser"]
timeout: 45s
interval: 30s
retries: 10
redis:
image: redis:8-alpine
container_name: Outline-REDIS
hostname: outline-redis
security_opt:
- no-new-privileges:true
user: 1026:100
volumes:
- /volume1/docker/outline/redis:/data:rw
environment:
TZ: Europe/Bucharest
restart: on-failure:5
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
outline:
image: outlinewiki/outline:latest
container_name: Outline
user: 1026:100
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
URL: https://outline.yourdomain.synology.me
DATABASE_URL: 'postgresql://outlineuser:outlinepass@db:5432/outline?sslmode=disable'
REDIS_URL: 'redis://redis:6379'
REDIS_COLLABORATION_URL: 'redis://redis:6379/1'
SECRET_KEY: SECRET_KEY # hex32
UTILS_SECRET: UTILS_SECRET # hex32
SMTP_HOST: smtp.gmail.com
SMTP_PORT: 465
SMTP_USERNAME: Your-own-gmail-address
SMTP_PASSWORD: Your-own-app-password
SMTP_FROM_EMAIL: Your-own-gmail-address
ports:
- 4787:3000
volumes:
- /volume1/docker/outline/data:/var/lib/outline/data:rw
restart: on-failure:5
healthcheck:
test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
| 1 | services: |
| 2 | postgres: |
| 3 | image: postgres:18 |
| 4 | container_name: Outline-DB |
| 5 | user: 1026:100 |
| 6 | security_opt: |
| 7 | - no-new-privileges:true |
| 8 | volumes: |
| 9 | - /volume1/docker/outline/db:/var/lib/postgresql/:rw |
| 10 | environment: |
| 11 | POSTGRES_DB: outline |
| 12 | POSTGRES_USER: outlineuser |
| 13 | POSTGRES_PASSWORD: outlinepass |
| 14 | restart: on-failure:5 |
| 15 | healthcheck: |
| 16 | test: ["CMD", "pg_isready", "-q", "-d", "outline", "-U", "outlineuser"] |
| 17 | timeout: 45s |
| 18 | interval: 30s |
| 19 | retries: 10 |
| 20 | |
| 21 | redis: |
| 22 | image: redis:8-alpine |
| 23 | container_name: Outline-REDIS |
| 24 | hostname: outline-redis |
| 25 | security_opt: |
| 26 | - no-new-privileges:true |
| 27 | user: 1026:100 |
| 28 | volumes: |
| 29 | - /volume1/docker/outline/redis:/data:rw |
| 30 | environment: |
| 31 | TZ: Europe/Bucharest |
| 32 | restart: on-failure:5 |
| 33 | healthcheck: |
| 34 | test: ["CMD-SHELL", "redis-cli ping || exit 1"] |
| 35 | |
| 36 | outline: |
| 37 | image: outlinewiki/outline:latest |
| 38 | container_name: Outline |
| 39 | user: 1026:100 |
| 40 | depends_on: |
| 41 | postgres: |
| 42 | condition: service_healthy |
| 43 | redis: |
| 44 | condition: service_healthy |
| 45 | environment: |
| 46 | NODE_ENV: production |
| 47 | URL: https://outline.yourdomain.synology.me |
| 48 | DATABASE_URL: 'postgresql://outlineuser:outlinepass@db:5432/outline?sslmode=disable' |
| 49 | REDIS_URL: 'redis://redis:6379' |
| 50 | REDIS_COLLABORATION_URL: 'redis://redis:6379/1' |
| 51 | SECRET_KEY: SECRET_KEY # hex32 |
| 52 | UTILS_SECRET: UTILS_SECRET # hex32 |
| 53 | SMTP_HOST: smtp.gmail.com |
| 54 | SMTP_PORT: 465 |
| 55 | SMTP_USERNAME: Your-own-gmail-address |
| 56 | SMTP_PASSWORD: Your-own-app-password |
| 57 | SMTP_FROM_EMAIL: Your-own-gmail-address |
| 58 | ports: |
| 59 | - 4787:3000 |
| 60 | volumes: |
| 61 | - /volume1/docker/outline/data:/var/lib/outline/data:rw |
| 62 | restart: on-failure:5 |
| 63 | healthcheck: |
| 64 | test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1 |
| 65 | interval: 10s |
| 66 | timeout: 5s |
| 67 | retries: 3 |
| 68 | start_period: 90s |