forked from CoreBunch/Instatic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.sqlite.yml
More file actions
27 lines (24 loc) · 1 KB
/
Copy pathcompose.sqlite.yml
File metadata and controls
27 lines (24 loc) · 1 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
# compose.sqlite.yml
# Override for compose.prod.yml that runs the CMS against SQLite instead of Postgres.
# Usage: docker compose -f compose.prod.yml -f compose.sqlite.yml up -d
#
# What this does:
# - Disables the postgres service (moved to the _disabled profile).
# - Points DATABASE_URL at a SQLite file inside the container's /app/data volume.
# - Mounts a named volume at /app/data so the database survives container restarts.
# - Removes the postgres health-check dependency from the app service.
services:
postgres:
profiles: ['_disabled']
app:
environment:
DATABASE_URL: sqlite:/app/data/cms.db
volumes:
- data:/app/data
# `!reset` is required (compose v2) — without it, plain `depends_on: {}` is
# *merged* with the parent file's depends_on instead of replacing it, leaving
# the now-profile-disabled `postgres` dependency in place. With `!reset {}`
# the dependency is fully cleared so the app starts standalone.
depends_on: !reset {}
volumes:
data: