mirror of
https://github.com/arch3rPro/1Panel-Appstore.git
synced 2026-04-19 03:17:11 +08:00
fix: update docker-compose.yml
This commit is contained in:
@@ -3,17 +3,17 @@ additionalProperties:
|
|||||||
- default: 8000
|
- default: 8000
|
||||||
edit: true
|
edit: true
|
||||||
envKey: PANEL_APP_PORT_HTTP
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
labelEn: Web UI Port
|
labelEn: Web Port
|
||||||
labelZh: Web界面端口
|
labelZh: Web端口
|
||||||
required: true
|
required: true
|
||||||
rule: paramPort
|
rule: paramPort
|
||||||
type: number
|
type: number
|
||||||
label:
|
- default: ""
|
||||||
en: Web UI Port
|
edit: true
|
||||||
ja: Web UI ポート
|
envKey: PANEL_DB_USER_PASSWORD
|
||||||
ms: Port UI Web
|
labelEn: Database Password
|
||||||
pt-br: Porta da interface web
|
labelZh: 数据库用户密码
|
||||||
ru: Веб-порт интерфейса
|
random: true
|
||||||
ko: 웹 UI 포트
|
required: true
|
||||||
zh-Hant: Web UI 埠
|
rule: paramComplexity
|
||||||
zh: Web界面端口
|
type: password
|
||||||
@@ -1,21 +1,60 @@
|
|||||||
|
version: '3.4'
|
||||||
services:
|
services:
|
||||||
netbox:
|
netbox:
|
||||||
container_name: ${CONTAINER_NAME}
|
image: netboxcommunity/netbox:latest
|
||||||
image: lscr.io/linuxserver/netbox:latest
|
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
env_file:
|
||||||
- 1panel-network
|
- netbox.env
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
- redis-cache
|
||||||
ports:
|
ports:
|
||||||
- "${PANEL_APP_PORT_HTTP}:8000"
|
- "${PANEL_APP_PORT_HTTP}:8080"
|
||||||
environment:
|
|
||||||
- TZ=Asia/Shanghai
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=1000
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/config
|
- ./netbox-media:/opt/netbox/netbox/media
|
||||||
- ./data:/data
|
- ./netbox-reports:/etc/netbox/reports
|
||||||
|
- ./netbox-scripts:/etc/netbox/scripts
|
||||||
|
command: /opt/netbox/launch-netbox.sh
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health/", "||", "exit", "1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
labels:
|
labels:
|
||||||
createdBy: "Apps"
|
org.opencontainers.image.source: https://github.com/netbox-community/netbox-docker
|
||||||
networks:
|
postgres:
|
||||||
1panel-network:
|
image: postgres:15-alpine
|
||||||
external: true
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: netbox
|
||||||
|
POSTGRES_USER: netbox
|
||||||
|
POSTGRES_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- ./postgres-data:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready", "-U", "netbox"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
redis-cache:
|
||||||
|
image: redis:7-alpine
|
||||||
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
volumes:
|
||||||
|
netbox-media:
|
||||||
|
netbox-reports:
|
||||||
|
netbox-scripts:
|
||||||
|
postgres-data:
|
||||||
11
apps/netbox/latest/netbox.env
Normal file
11
apps/netbox/latest/netbox.env
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Netbox 环境变量示例
|
||||||
|
SUPERUSER_NAME=admin
|
||||||
|
SUPERUSER_EMAIL=admin@example.com
|
||||||
|
SUPERUSER_PASSWORD=admin
|
||||||
|
ALLOWED_HOSTS=*
|
||||||
|
DB_NAME=netbox
|
||||||
|
DB_USER=netbox
|
||||||
|
DB_PASSWORD=${PANEL_DB_USER_PASSWORD}
|
||||||
|
DB_HOST=postgres
|
||||||
|
REDIS_HOST=redis
|
||||||
|
REDIS_CACHE_HOST=redis-cache
|
||||||
Reference in New Issue
Block a user