添加portainer,优化部署
This commit is contained in:
24
portainer/docker-compose.yml
Normal file
24
portainer/docker-compose.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
services:
|
||||
portainer:
|
||||
image: ${PORTAINER_IMAGE:-portainer/portainer-ce:lts}
|
||||
container_name: portainer
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ${PORTAINER_DATA_DIR:-/var/lib/portainer}:/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "127.0.0.1:9000:9000"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:9000/api/system/status"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
Reference in New Issue
Block a user