Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
133 lines (125 loc) · 3.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
133 lines (125 loc) · 3.92 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Indiekit Docker Compose
#
# The plugin set is composed from config/plugins.yaml + the plugin-registry
# (make compose → .compiled/) — there is no core/full profile split anymore.
#
# Usage:
# cp .env.example .env # Edit with your values
# make up # runs `make compose` then `docker compose up -d`
services:
mongodb:
image: mongo:7
volumes:
- mongodb_data:/data/db
restart: unless-stopped
# Optional: only needed when a plugin that uses it is enabled (e.g. the
# ActivityPub endpoint's Fedify KV store). Gated behind the `redis` profile so
# it does NOT start by default. Enable with `docker compose --profile redis up -d`
# (or add it to a docker-compose.override.yml) and set REDIS_URL=redis://redis:6379.
# Nothing in this file depends_on redis, so the profile gate is self-contained.
redis:
image: redis:7-alpine
restart: unless-stopped
profiles:
- redis
indiekit:
image: rmdes/indiekit-deploy-server:latest
build:
context: .
dockerfile: docker/indiekit/Dockerfile
depends_on:
- mongodb
env_file: .env
environment:
- MONGODB_URL=mongodb://mongodb:27017/indiekit
- PORT=8080
volumes:
- content:/data/content
# Also mount content at /app/data/content — the shared theme + site-config
# plugin hardcode that Cloudron-style path for runtime artifacts
# (site-config.json, theme.css, homepage.json, loaded-plugins.json). Mounting
# the same volume here lets site-config's writes cross to the eleventy container.
- content:/app/data/content
- uploads:/data/uploads
- indiekit_config:/data/config
restart: unless-stopped
eleventy:
image: rmdes/indiekit-deploy-site:latest
build:
context: .
dockerfile: docker/eleventy/Dockerfile
depends_on:
- indiekit
env_file: .env
environment:
- INDIEKIT_URL=http://indiekit:8080
volumes:
- content:/data/content
# See indiekit service: theme reads runtime artifacts from /app/data/content/_data.
- content:/app/data/content
- site:/data/site
- cache:/data/cache
- uploads:/data/uploads
restart: unless-stopped
caddy:
image: caddy:2-alpine
depends_on:
- indiekit
- eleventy
ports:
- "80:80"
- "443:443"
- "443:443/udp" # HTTP/3
env_file: .env
volumes:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
# Migration redirects — populated by `make migrate-apply`. The placeholder
# at this path contains only comments so Caddy starts cleanly even if
# migration was never run.
- ./docker/caddy/migration-redirects:/etc/caddy/migration-redirects:ro
- site:/data/site:ro
- uploads:/data/uploads:ro
- content:/data/content:ro
- caddy_data:/data/caddy
- caddy_config:/config
restart: unless-stopped
cron:
image: rmdes/indiekit-deploy-cron:latest
build:
context: .
dockerfile: docker/cron/Dockerfile
depends_on:
- indiekit
env_file: .env
environment:
- INDIEKIT_URL=http://indiekit:8080
volumes:
- indiekit_config:/data/config:ro
restart: unless-stopped
# One-shot migrator. Profile-gated so `make up` doesn't start it. Bind-mounts
# the source tree at /migration so iterating on adapters doesn't require
# rebuilding the image. Mounts the live volumes and the Caddy config dir
# so `migrate-apply` can write content, uploads, and the redirects snippet.
migrator:
image: rmdes/indiekit-deploy-migrator:latest
build:
context: .
dockerfile: docker/migrator/Dockerfile
profiles:
- migrate
volumes:
- ./migration:/migration
- ./docker/caddy:/migration-caddy
- content:/data/content
- uploads:/data/uploads
working_dir: /migrator
restart: "no"
volumes:
mongodb_data:
content:
site:
cache:
uploads:
indiekit_config:
caddy_data:
caddy_config: