add nas docker compose config
This commit is contained in:
68
docker_compose_Nas.yaml
Normal file
68
docker_compose_Nas.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
services:
|
||||
gemini-drawpicture:
|
||||
# NAS deployment file.
|
||||
#
|
||||
# Recommended NAS path:
|
||||
# /share/Container/Gemini_Draw
|
||||
#
|
||||
# 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:
|
||||
# cd /share/Container/Gemini_Draw
|
||||
# cp .env.example .env.local
|
||||
# vi .env.local
|
||||
#
|
||||
# Required values in .env.local:
|
||||
# GEMINI_API_KEY="your_gemini_api_key"
|
||||
# API_AUTH_TOKEN="a_long_random_api_access_token"
|
||||
# API_AUTH_DISABLED="false"
|
||||
# APP_PASSWORD="your_web_login_password"
|
||||
# APP_URL="http://192.168.31.5:4001"
|
||||
#
|
||||
# Build and start:
|
||||
# cd /share/Container/Gemini_Draw
|
||||
# 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:4002/api/health
|
||||
build:
|
||||
context: /share/Container/Gemini_Draw
|
||||
dockerfile: Dockerfile
|
||||
container_name: gemini-drawpicture
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.local
|
||||
environment:
|
||||
# Keep API auth enabled on NAS. Use API_AUTH_TOKEN from .env.local.
|
||||
API_AUTH_DISABLED: "false"
|
||||
API_PORT: "3002"
|
||||
|
||||
# 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 4002 -> API port 3002 in container.
|
||||
- "4002: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
|
||||
Reference in New Issue
Block a user