-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
103 lines (87 loc) · 2.87 KB
/
compose.yaml
File metadata and controls
103 lines (87 loc) · 2.87 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
name: mealie
x-daemonless:
title: "Mealie"
icon: ":material-food:"
category: "Utilities"
description: "Intuitive self-hosted recipe management app designed to be the best recipe management experience on the web."
upstream_url: "https://github.com/mealie-recipes/mealie"
web_url: "https://mealie.io/"
freshports_url: ""
user: "bsd"
mlock: false
upstream_binary: true
appjail: true
notes: |
## Using PostgreSQL
By default, Mealie uses SQLite. For better performance with multiple users, use PostgreSQL:
```yaml
services:
mealie:
image: ghcr.io/daemonless/mealie:latest
container_name: mealie
environment:
- BASE_URL=http://localhost:@MEALIE_PORT@
- PUID=@PUID@
- PGID=@PGID@
- TZ=@TZ@
- DB_ENGINE=postgres
- POSTGRES_USER=mealie
- POSTGRES_PASSWORD=changeme
- POSTGRES_SERVER=localhost
- POSTGRES_PORT=5432
- POSTGRES_DB=mealie
volumes:
- @CONTAINER_CONFIG_ROOT@/@MEALIE_CONFIG_PATH@:/config
ports:
- "@MEALIE_PORT@:9000"
depends_on:
- postgres
network_mode: host
restart: unless-stopped
postgres:
image: ghcr.io/daemonless/postgres:latest
container_name: mealie-postgres
environment:
- POSTGRES_USER=mealie
- POSTGRES_PASSWORD=changeme
- POSTGRES_DB=mealie
volumes:
- @CONTAINER_CONFIG_ROOT@/mealie-postgres:/config
network_mode: host
restart: unless-stopped
```
**Note:** With `network_mode: host`, use `localhost` for `POSTGRES_SERVER`.
## Migrating from Linux
**SQLite:** No issues, just copy your data.
**PostgreSQL:** You cannot copy the postgres data directory between Linux and FreeBSD due to locale incompatibilities. Use `pg_dump`/`pg_restore` instead:
```bash
# On Linux
podman exec mealie-postgres pg_dump -U mealie mealie > mealie.sql
# On FreeBSD (start fresh postgres first, then restore)
cat mealie.sql | podman exec -i mealie-postgres psql -U mealie -d mealie
```
See [daemonless/postgres README](https://github.com/daemonless/postgres#migrating-from-linux) for details.
docs:
env:
PUID: "User ID for the application process"
PGID: "Group ID for the application process"
TZ: "Timezone for the container"
BASE_URL: "The base URL for the application (e.g. https://mealie.example.com)"
volumes:
/config: "Data directory (database, images)"
ports:
9000: "Web UI"
services:
mealie:
image: ghcr.io/daemonless/mealie:latest
container_name: mealie
restart: unless-stopped
environment:
- BASE_URL=http://localhost:9000
- PUID=1000
- PGID=1000
- TZ=UTC
volumes:
- /path/to/containers/mealie:/config
ports:
- "9000:9000"