Files
Gemini_Draw/docker_compose_Nas.yaml

65 lines
2.3 KiB
YAML

services:
gemini-drawpicture:
# NAS deployment file.
#
# Recommended NAS path:
# /share/Container/gemini-drawpicture
#
# If your project is in a different folder, update `build.context` below
# or run compose from the project folder and change it to `.`.
#
# First-time setup on NAS source folder:
# cd /share/Container/gemini-drawpicture
#
# Container Station validates compose files from /tmp, so do not use
# relative environment-file paths here. Fill values directly below.
#
# Build and start:
# cd /share/Container/gemini-drawpicture
# sudo docker compose -f docker_compose_Nas.yaml up -d --build
#
# Rebuild from scratch:
# sudo docker compose -f docker_compose_Nas.yaml build --no-cache
# sudo docker compose -f docker_compose_Nas.yaml up -d --force-recreate
#
# View logs:
# sudo docker logs -f gemini-drawpicture
#
# Access:
# UI: http://192.168.31.5:4001/
# API: http://192.168.31.5:4000/api/health
build:
context: /share/Container/gemini-drawpicture
dockerfile: Dockerfile
container_name: gemini-drawpicture
init: true
restart: unless-stopped
environment:
# Required business settings.
GEMINI_API_KEY: "CHANGE_ME_TO_YOUR_GEMINI_API_KEY"
API_AUTH_TOKEN: "CHANGE_ME_TO_A_LONG_RANDOM_TOKEN"
API_AUTH_DISABLED: "false"
API_PORT: "3002"
APP_PASSWORD: "CHANGE_ME_TO_YOUR_WEB_PASSWORD"
APP_URL: "http://192.168.31.5:4001"
# Optional proxy settings. Keep them if NAS needs OpenClash/proxy
# to reach Google/Gemini; otherwise comment these lines out.
HTTP_PROXY: "http://192.168.31.7:7893"
HTTPS_PROXY: "http://192.168.31.7:7893"
http_proxy: "http://192.168.31.7:7893"
https_proxy: "http://192.168.31.7:7893"
NO_PROXY: "localhost,127.0.0.1,192.168.31.0/24"
no_proxy: "localhost,127.0.0.1,192.168.31.0/24"
ports:
# Host port 4001 -> frontend port 3000 in container.
- "4001:3000"
# Host port 4000 -> API port 3002 in container.
- "4000:3002"
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3002/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s