Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (87 loc) · 3.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (87 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Self-host Pluck: `docker compose up -d`, then open http://localhost:3000.
# Everything is configured by environment variables (an .env file next to this one works); see docs/self-host.md.
name: pluck
x-app: &app
build:
context: .
args:
NEXT_PUBLIC_POSTHOG_KEY: ${NEXT_PUBLIC_POSTHOG_KEY:-}
POSTHOG_HOST: ${POSTHOG_HOST:-}
image: pluck:local
restart: unless-stopped
volumes: [secrets:/data]
environment:
MONGODB_URI: mongodb://mongo:27017/pluck?replicaSet=rs0&directConnection=true
BETTER_AUTH_URL: ${PLUCK_URL:-http://localhost:3000}
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-}
EMAIL_FROM: ${EMAIL_FROM:-Pluck <pluck@localhost>}
DIGEST_FROM: ${DIGEST_FROM:-}
EMAIL_REPLY_TO: ${EMAIL_REPLY_TO:-}
WELCOME_FROM: ${WELCOME_FROM:-}
DIGEST_SECRET: ${DIGEST_SECRET:-}
# Mailpit (below) catches sign-in links at http://localhost:8025. Point this at your own SMTP server to send real mail.
SMTP_URL: ${SMTP_URL:-smtp://mailpit:1025}
AWS_REGION: ${AWS_REGION:-eu-west-1}
S3_BUCKET: ${S3_BUCKET:-pluck-content}
S3_ENDPOINT: ${S3_ENDPOINT:-http://minio:9000}
# Where browsers and phones reach the blob store (uploads, covers, exports).
S3_PUBLIC_ENDPOINT: ${S3_PUBLIC_ENDPOINT:-http://localhost:9000}
AWS_ACCESS_KEY_ID: ${S3_ACCESS_KEY:-pluck}
AWS_SECRET_ACCESS_KEY: ${S3_SECRET_KEY:-pluck-change-me}
ADMIN_EMAILS: ${ADMIN_EMAILS:-}
ABUSE_EMAIL: ${ABUSE_EMAIL:-}
EMAIL_IN_DOMAIN: ${EMAIL_IN_DOMAIN:-}
POSTHOG_HOST: ${POSTHOG_HOST:-}
REVIEW_EMAIL: ${REVIEW_EMAIL:-}
REVIEW_PASSWORD: ${REVIEW_PASSWORD:-}
APPLE_TEAM_ID: ${APPLE_TEAM_ID:-}
depends_on:
mongo: { condition: service_healthy }
minio-init: { condition: service_completed_successfully }
services:
web:
<<: *app
# Local only: put your HTTPS reverse proxy in front (see docs/self-host.md).
ports: ["127.0.0.1:${PLUCK_PORT:-3000}:3000"]
worker:
<<: *app
command: ["pnpm", "--filter", "@pluck/web", "worker"]
healthcheck: { disable: true }
mongo:
image: mongo:8.2
restart: unless-stopped
command: ["--replSet", "rs0", "--bind_ip_all"]
volumes: [mongo:/data/db]
healthcheck:
# Starts the single-node replica set on first boot (change streams and transactions need one).
test: ["CMD", "mongosh", "--quiet", "--eval", "try { rs.status().ok } catch (e) { rs.initiate({ _id: 'rs0', members: [{ _id: 0, host: '127.0.0.1:27017' }] }).ok }"]
interval: 2s
timeout: 10s
retries: 30
minio:
image: cgr.dev/chainguard/minio:latest
restart: unless-stopped
command: ["server", "/data"]
# Local only by default. To reach it from phones or other machines, publish it behind your reverse proxy
# and set S3_PUBLIC_ENDPOINT to that address.
ports: ["127.0.0.1:${MINIO_PORT:-9000}:9000"]
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY:-pluck}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:-pluck-change-me}
volumes: [minio:/data]
minio-init:
image: amazon/aws-cli:2.27.7
depends_on: [minio]
environment:
AWS_ACCESS_KEY_ID: ${S3_ACCESS_KEY:-pluck}
AWS_SECRET_ACCESS_KEY: ${S3_SECRET_KEY:-pluck-change-me}
AWS_DEFAULT_REGION: eu-west-1
entrypoint: ["sh", "-c", "until aws --endpoint-url http://minio:9000 s3 ls >/dev/null 2>&1; do sleep 1; done; aws --endpoint-url http://minio:9000 s3api head-bucket --bucket pluck-content 2>/dev/null || aws --endpoint-url http://minio:9000 s3 mb s3://pluck-content"]
mailpit:
image: axllent/mailpit:v1.27
restart: unless-stopped
ports: ["127.0.0.1:${MAILPIT_PORT:-8025}:8025"]
volumes:
mongo:
minio:
secrets: