2021-10-07 11:13:05 -08:00
# Installing with PostgreSQL
2023-05-13 20:50:22 +02:00
PostgreSQL might be considered if you need to support many concurrent users. In addition, some features are only enabled on PostgreSQL, such as fuzzy search.
2024-01-15 13:20:56 +11:00
**For Environment Variable Configuration, see** [Backend Configuration ](./backend-config.md )
2021-10-07 11:13:05 -08:00
```yaml
---
version: "3.7"
services:
2023-09-14 06:40:13 -08:00
mealie:
2024-01-15 13:20:56 +11:00
image: ghcr.io/mealie-recipes/mealie:v1.0.0-RC2
2023-09-14 06:40:13 -08:00
container_name: mealie
2021-10-07 11:13:05 -08:00
ports:
2023-09-14 06:40:13 -08:00
- "9925:9000"
2022-10-22 20:00:13 -08:00
deploy:
resources:
limits:
2023-09-14 06:40:13 -08:00
memory: 1000M # (1)
2022-02-20 14:17:51 -09:00
depends_on:
- postgres
2021-10-07 11:13:05 -08:00
volumes:
2022-02-20 14:17:51 -09:00
- mealie-data:/app/data/
2021-10-07 11:13:05 -08:00
environment:
# Set Backend ENV Variables Here
2022-03-15 17:34:53 -08:00
- ALLOW_SIGNUP=true
2021-10-07 11:13:05 -08:00
- PUID=1000
- PGID=1000
- TZ=America/Anchorage
- MAX_WORKERS=1
- WEB_CONCURRENCY=1
2022-02-20 14:17:51 -09:00
- BASE_URL=https://mealie.yourdomain.com
2021-10-07 11:13:05 -08:00
# Database Settings
- DB_ENGINE=postgres
- POSTGRES_USER=mealie
- POSTGRES_PASSWORD=mealie
- POSTGRES_SERVER=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=mealie
restart: always
postgres:
container_name: postgres
2023-09-26 16:35:23 +02:00
image: postgres:15
2021-10-07 11:13:05 -08:00
restart: always
2023-01-08 04:21:42 +01:00
volumes:
2023-12-28 07:03:49 +11:00
- mealie-pgdata:/var/lib/postgresql/data
2021-10-07 11:13:05 -08:00
environment:
POSTGRES_PASSWORD: mealie
POSTGRES_USER: mealie
2022-02-20 14:17:51 -09:00
volumes:
mealie-data:
driver: local
2023-01-08 04:21:42 +01:00
mealie-pgdata:
driver: local
2021-10-07 11:13:05 -08:00
```
2022-03-13 15:42:22 -08:00
<!-- Updating This? Be Sure to also update the SQLite Annotations -->
2023-09-28 18:17:10 -05:00
1. To access the mealie interface you only need to expose port 9000 on the mealie container. Here we expose port 9925 on the host, but feel free to change this to any port you like.
2023-09-14 06:40:13 -08:00
2. Setting an explicit memory limit is recommended. Python can pre-allocate larger amounts of memory than is necessary if you have a machine with a lot of RAM. This can cause the container to idle at a high memory usage. Setting a memory limit will improve idle performance.