mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-10-31 10:11:49 +08:00
97 lines
3.0 KiB
YAML
97 lines
3.0 KiB
YAML
#
|
|
# Copyright 2016-present the IoT DC3 original author or authors.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
x-logging: &default-logging
|
|
driver: json-file
|
|
options:
|
|
max-size: ${DC3_LOG_MAX_SIZE:-10M}
|
|
max-file: "${DC3_LOG_MAX_FILE:-20}"
|
|
|
|
services:
|
|
postgres:
|
|
build:
|
|
context: ./dependencies/postgres
|
|
dockerfile: Dockerfile
|
|
args:
|
|
DC3_BASE_REGISTRY: ${DC3_IMAGE_REGISTRY:-pnoker}
|
|
DC3_BASE_TAG: ${DC3_IMAGE_TAG:-2026.6}
|
|
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-postgres:${DC3_IMAGE_TAG:-2026.6}
|
|
restart: always
|
|
ports:
|
|
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_POSTGRES_PORT:-35432}:5432"
|
|
environment:
|
|
- POSTGRES_DB=${POSTGRES_DB:-dc3}
|
|
- POSTGRES_USER=${POSTGRES_USERNAME:-dc3}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-dc3dc3dc3}
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USERNAME:-dc3} -d ${POSTGRES_DB:-dc3}" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 15s
|
|
container_name: dc3-postgres
|
|
hostname: dc3-postgres
|
|
volumes:
|
|
- postgres:/var/lib/postgresql
|
|
logging: *default-logging
|
|
networks:
|
|
dc3net:
|
|
aliases:
|
|
- dc3-postgres
|
|
|
|
rabbitmq:
|
|
build:
|
|
context: ./dependencies/rabbitmq
|
|
dockerfile: Dockerfile
|
|
args:
|
|
DC3_BASE_REGISTRY: ${DC3_IMAGE_REGISTRY:-pnoker}
|
|
DC3_BASE_TAG: ${DC3_IMAGE_TAG:-2026.6}
|
|
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-rabbitmq:${DC3_IMAGE_TAG:-2026.6}
|
|
restart: always
|
|
ports:
|
|
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_RABBITMQ_TLS_PORT:-35671}:5671"
|
|
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_RABBITMQ_PORT:-35672}:5672"
|
|
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_RABBITMQ_MANAGEMENT_PORT:-15672}:15672"
|
|
environment:
|
|
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_VIRTUAL_HOST:-dc3}
|
|
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USERNAME:-dc3}
|
|
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD:-dc3dc3dc3}
|
|
- RABBITMQ_MQTT_EXCHANGE=${RABBITMQ_MQTT_EXCHANGE:-dc3.e.mqtt}
|
|
healthcheck:
|
|
test: [ "CMD", "rabbitmq-diagnostics", "-q", "ping" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
container_name: dc3-rabbitmq
|
|
hostname: dc3-rabbitmq
|
|
volumes:
|
|
- rabbitmq:/var/lib/rabbitmq
|
|
logging: *default-logging
|
|
networks:
|
|
dc3net:
|
|
aliases:
|
|
- dc3-rabbitmq
|
|
|
|
volumes:
|
|
postgres:
|
|
rabbitmq:
|
|
|
|
networks:
|
|
dc3net:
|
|
driver: bridge
|