feat: consolidate deployment targets and publish to ghcr.io (#2539)

* WIP: proof of concept

* basic meta tag injection

* add support for scraping public/private links

* make tests go brrrrr

* cleanup initialization

* rewrite build config

* remove recipe meta on frontend

* make type checker happy

* remove other deployment methods

* fix issue with JSON response on un-authenticated request

* docs updates

* update tivy scanner

* fix linter stuff

* change registry tag

* build fixes

* fix same mistake I always make
This commit is contained in:
Hayden
2023-09-14 06:40:13 -08:00
committed by GitHub
parent aec4cb4f31
commit 2ad6af2cce
34 changed files with 268 additions and 793 deletions

View File

@@ -4,33 +4,21 @@ PostgreSQL might be considered if you need to support many concurrent users. In
**For Environmental Variable Configuration See:**
- [Frontend Configuration](./frontend-config.md)
- [Backend Configuration](./backend-config.md)
- [Configuration](./backend-config.md)
```yaml
---
version: "3.7"
services:
mealie-frontend:
image: hkotel/mealie:frontend-v1.0.0beta-5
container_name: mealie-frontend
depends_on:
- mealie-api
environment:
# Set Frontend ENV Variables Here
- API_URL=http://mealie-api:9000 # (1)
restart: always
mealie:
image: ghcr.io/mealie-recipes/mealie:nightly
container_name: mealie
ports:
- "9925:3000" # (2)
volumes:
- mealie-data:/app/data/ # (3)
mealie-api:
image: hkotel/mealie:api-v1.0.0beta-5
container_name: mealie-api
- "9925:9000"
deploy:
resources:
limits:
memory: 1000M # (4)
memory: 1000M # (1)
depends_on:
- postgres
volumes:
@@ -72,8 +60,5 @@ volumes:
<!-- Updating This? Be Sure to also update the SQLite Annotations -->
1. Whoa whoa whoa, what is this nonsense? The API_URL is the URL the frontend container uses to proxy api requests to the backend server. In this example, the name `mealie-api` resolves to the `mealie-api` container which runs the API server on port 9000. This allows you to access the API without exposing an additional port on the host.
<br/> <br/> **Note** that both containers must be on the same docker-network for this to work.
2. To access the mealie interface you only need to expose port 3000 on the mealie-frontend container. Here we expose port 9925 on the host, feel free to change this to any port you like.
3. Mounting the data directory to the frontend is now required to access the images/assets directory. This can be mounted read-only. Internally the frontend containers runs a Caddy proxy server that serves the assets requested to reduce load on the backend API.
4. 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.
1. To access the mealie interface you only need to expose port 9000 on the mealie-frontend container. Here we expose port 9925 on the host, feel free to change this to any port you like.
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.