mirror of
https://github.com/l5yth/potato-mesh.git
synced 2026-03-28 17:42:48 +01:00
123 lines
3.3 KiB
YAML
123 lines
3.3 KiB
YAML
# Copyright © 2025-26 l5yth & contributors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
x-web-base: &web-base
|
|
image: ghcr.io/l5yth/potato-mesh-web-${POTATOMESH_IMAGE_ARCH:-linux-amd64}:${POTATOMESH_IMAGE_TAG:-latest}
|
|
environment:
|
|
APP_ENV: ${APP_ENV:-production}
|
|
RACK_ENV: ${RACK_ENV:-production}
|
|
SITE_NAME: ${SITE_NAME:-PotatoMesh Demo}
|
|
CHANNEL: ${CHANNEL:-#LongFast}
|
|
FREQUENCY: ${FREQUENCY:-915MHz}
|
|
MAP_CENTER: ${MAP_CENTER:-38.761944,-27.090833}
|
|
MAP_ZOOM: ${MAP_ZOOM:-""}
|
|
MAX_DISTANCE: ${MAX_DISTANCE:-42}
|
|
CONTACT_LINK: ${CONTACT_LINK:-#potatomesh:dod.ngo}
|
|
FEDERATION: ${FEDERATION:-1}
|
|
PRIVATE: ${PRIVATE:-0}
|
|
API_TOKEN: ${API_TOKEN}
|
|
INSTANCE_DOMAIN: ${INSTANCE_DOMAIN}
|
|
DEBUG: ${DEBUG:-0}
|
|
command: ["ruby", "app.rb", "-p", "41447", "-o", "0.0.0.0"]
|
|
volumes:
|
|
- potatomesh_data:/app/.local/share/potato-mesh
|
|
- potatomesh_config:/app/.config/potato-mesh
|
|
- potatomesh_logs:/app/logs
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: '0.5'
|
|
reservations:
|
|
memory: 256M
|
|
cpus: '0.25'
|
|
|
|
x-ingestor-base: &ingestor-base
|
|
image: ghcr.io/l5yth/potato-mesh-ingestor-${POTATOMESH_IMAGE_ARCH:-linux-amd64}:${POTATOMESH_IMAGE_TAG:-latest}
|
|
environment:
|
|
CONNECTION: ${CONNECTION:-/dev/ttyACM0}
|
|
CHANNEL_INDEX: ${CHANNEL_INDEX:-0}
|
|
HIDDEN_CHANNELS: ${HIDDEN_CHANNELS:-""}
|
|
API_TOKEN: ${API_TOKEN}
|
|
INSTANCE_DOMAIN: ${INSTANCE_DOMAIN}
|
|
POTATOMESH_INSTANCE: ${POTATOMESH_INSTANCE:-http://web:41447}
|
|
DEBUG: ${DEBUG:-0}
|
|
FEDERATION: ${FEDERATION:-1}
|
|
PRIVATE: ${PRIVATE:-0}
|
|
volumes:
|
|
- potatomesh_data:/app/.local/share/potato-mesh
|
|
- potatomesh_config:/app/.config/potato-mesh
|
|
- potatomesh_logs:/app/logs
|
|
- /dev:/dev
|
|
device_cgroup_rules:
|
|
- 'c 166:* rwm' # ttyACM devices
|
|
- 'c 188:* rwm' # ttyUSB devices
|
|
- 'c 4:* rwm' # ttyS devices
|
|
privileged: false
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '0.25'
|
|
reservations:
|
|
memory: 128M
|
|
cpus: '0.1'
|
|
|
|
services:
|
|
web:
|
|
<<: *web-base
|
|
network_mode: host
|
|
|
|
ingestor:
|
|
<<: *ingestor-base
|
|
network_mode: host
|
|
depends_on:
|
|
- web
|
|
extra_hosts:
|
|
- "web:127.0.0.1"
|
|
|
|
web-bridge:
|
|
<<: *web-base
|
|
container_name: potatomesh-web-bridge
|
|
networks:
|
|
- potatomesh-network
|
|
ports:
|
|
- "41447:41447"
|
|
profiles:
|
|
- bridge
|
|
|
|
ingestor-bridge:
|
|
<<: *ingestor-base
|
|
container_name: potatomesh-ingestor-bridge
|
|
networks:
|
|
- potatomesh-network
|
|
depends_on:
|
|
- web-bridge
|
|
profiles:
|
|
- bridge
|
|
|
|
volumes:
|
|
potatomesh_data:
|
|
driver: local
|
|
potatomesh_config:
|
|
driver: local
|
|
potatomesh_logs:
|
|
driver: local
|
|
|
|
networks:
|
|
potatomesh-network:
|
|
driver: bridge
|