2023-02-22 17:12:24 +08:00
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
container_name: ${CONTAINER_NAME}
|
2024-02-20 15:04:51 +08:00
|
|
|
image: postgres:16.2-alpine
|
2023-02-22 17:12:24 +08:00
|
|
|
restart: always
|
|
|
|
environment:
|
2023-02-22 18:04:02 +08:00
|
|
|
- POSTGRES_USER=${PANEL_DB_ROOT_USER}
|
2023-02-22 17:12:24 +08:00
|
|
|
- POSTGRES_PASSWORD=${PANEL_DB_ROOT_PASSWORD}
|
|
|
|
ports:
|
|
|
|
- ${PANEL_APP_PORT_HTTP}:5432
|
|
|
|
volumes:
|
|
|
|
- ./data:/var/lib/postgresql/data
|
2024-05-09 11:11:46 +08:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-p", "5432", "-q", "-U", "${PANEL_DB_ROOT_USER}"]
|
|
|
|
start_period: 20s
|
|
|
|
interval: 30s
|
|
|
|
retries: 5
|
|
|
|
timeout: 5s
|
2023-02-22 17:12:24 +08:00
|
|
|
networks:
|
|
|
|
- 1panel-network
|
2023-03-30 14:26:29 +08:00
|
|
|
labels:
|
|
|
|
createdBy: "Apps"
|
2023-02-22 17:12:24 +08:00
|
|
|
networks:
|
|
|
|
1panel-network:
|
|
|
|
external: true
|