108 lines
2.6 KiB
YAML
108 lines
2.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
wxconnect:
|
|
build: .
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# MQTT Configuration
|
|
MQTT_HOST: ${MQTT_HOST}
|
|
MQTT_PORT: ${MQTT_PORT}
|
|
MQTT_USERNAME: ${MQTT_USERNAME}
|
|
MQTT_PASSWORD: ${MQTT_PASSWORD}
|
|
MQTT_TOPIC: ${MQTT_TOPIC}
|
|
MQTT_CLIENT_ID: wxconnect-docker
|
|
|
|
# Database Configuration
|
|
DB_TYPE: ${DB_TYPE}
|
|
DB_HOST: ${DB_HOST}
|
|
DB_PORT: ${DB_PORT}
|
|
DB_NAME: ${DB_NAME}
|
|
DB_USERNAME: ${DB_USERNAME}
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
DB_SCHEMA: ${DB_SCHEMA}
|
|
|
|
# Oracle specific
|
|
ORACLE_SID: ${ORACLE_SID}
|
|
|
|
# MS SQL specific
|
|
MSSQL_DRIVER: ${MSSQL_DRIVER}
|
|
|
|
# Logging
|
|
LOG_LEVEL: ${LOG_LEVEL}
|
|
|
|
# Application Settings
|
|
RECONNECT_INTERVAL: ${RECONNECT_INTERVAL}
|
|
BATCH_SIZE: ${BATCH_SIZE}
|
|
BATCH_TIMEOUT: ${BATCH_TIMEOUT}
|
|
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./src:/app/src
|
|
- ./.env:/app/.env:ro # Mount environment file if it exists
|
|
|
|
networks:
|
|
- wxconnect-network
|
|
|
|
# Remove dependency on local Oracle container since using external Oracle
|
|
# depends_on:
|
|
# - oracle-db
|
|
|
|
# Example Oracle database service (commented out - using external Oracle)
|
|
# oracle-db:
|
|
# image: gvenzl/oracle-xe:21-slim
|
|
# container_name: oracle-wxconnect
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# ORACLE_PASSWORD: password
|
|
# APP_USER: weather
|
|
# APP_USER_PASSWORD: password
|
|
# ports:
|
|
# - "1521:1521"
|
|
# volumes:
|
|
# - oracle_data:/opt/oracle/oradata
|
|
# networks:
|
|
# - wxconnect-network
|
|
|
|
# Example PostgreSQL database service (alternative to Oracle)
|
|
# postgres-db:
|
|
# image: postgres:15
|
|
# container_name: postgres-wxconnect
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# POSTGRES_DB: weather
|
|
# POSTGRES_USER: weather
|
|
# POSTGRES_PASSWORD: password
|
|
# ports:
|
|
# - "5432:5432"
|
|
# volumes:
|
|
# - postgres_data:/var/lib/postgresql/data
|
|
# networks:
|
|
# - wxconnect-network
|
|
|
|
# Example MS SQL Server database service (alternative)
|
|
# mssql-db:
|
|
# image: mcr.microsoft.com/mssql/server:2022-latest
|
|
# container_name: mssql-wxconnect
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# SA_PASSWORD: "YourStrong@Passw0rd"
|
|
# ACCEPT_EULA: "Y"
|
|
# MSSQL_DB: weather
|
|
# ports:
|
|
# - "1433:1433"
|
|
# volumes:
|
|
# - mssql_data:/var/opt/mssql
|
|
# networks:
|
|
# - wxconnect-network
|
|
|
|
volumes:
|
|
oracle_data:
|
|
# postgres_data:
|
|
# mssql_data:
|
|
|
|
networks:
|
|
wxconnect-network:
|
|
driver: bridge |