Closed changchiyou closed 3 hours ago
NVM, I found that there is no default value setting at loadConfig:
Which means I have to set sendJoinLeave
if I want to enable the feature, it's not frendly enought for docker user - since we have to assign ALL variables into enviorments
section.
docker-compose.yml
``` services: factorio: container_name: Factorio image: factoriotools/factorio:stable environment: CONSOLE_LOG_LOCATION: "/factorio/console.log" ports: - "34197:34197/udp" - "27015:27015/tcp" volumes: - /opt/factorio:/factorio restart: always labels: - "com.centurylinklabs.watchtower.scope=${COMPOSE_PROJECT_NAME}" healthcheck: test: ["CMD-SHELL", "grep -q 'Starting RCON interface at IP ADDR' /factorio/factorio-current.log || exit 1"] interval: 60s timeout: 10s retries: 3 start_period: 2s factorigochatbot: container_name: FactoriGOChatBot image: mattie112/factorigo-chat-bot:latest environment: LOG_LEVEL: debug DISCORD_TOKEN: "${FACTORIOGOCHATBOT_DISCORD_TOKEN}" DISCORD_CHANNEL_ID: "${FACTORIOGOCHATBOT_DISCORD_CHANNEL_ID}" RCON_IP: "factorio" RCON_PORT: "${RCON_PORT-27015}" RCON_PASSWORD: "${RCONPW}" FACTORIO_LOG: "/opt-factorio/console.log" ACHIEVEMENT_MODE: "true" volumes: - /opt/factorio:/opt-factorio restart: always depends_on: factorio: condition: service_healthy watchtower: container_name: Watchtower image: containrrr/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock - /root/.docker/config.json:/config.json command: --interval 30 environment: WATCHTOWER_NO_STARTUP_MESSAGE: "true" WATCHTOWER_REMOVE_VOLUMES: "true" WATCHTOWER_ROLLING_RESTART: "true" WATCHTOWER_CLEANUP: "true" WATCHTOWER_SCOPE: "${COMPOSE_PROJECT_NAME}" TZ: "Asia/Taipei" WATCHTOWER_NOTIFICATION_REPORT: "true" WATCHTOWER_NOTIFICATION_URL: > discord://${WATCHTOWER_DISCORD_WEBHOOK_TOKEN}@${WATCHTOWER_DISCORD_WEBHOOK_ID} WATCHTOWER_NOTIFICATION_TEMPLATE: | {{- if .Report -}} {{- with .Report -}} {{- if ( or .Updated .Failed ) -}} **Watchtower Report Summary** - **Scanned:** {{len .Scanned}} - **Updated:** {{len .Updated}} - **Failed:** {{len .Failed}} {{- if .Updated}} **Updated Containers:** {{- range .Updated}} - **{{.Name}}** ({{.ImageName}}) - Current ID: `{{.CurrentImageID.ShortID}}` - Updated to: `{{.LatestImageID.ShortID}}` {{- end -}} {{- end}} {{- if .Skipped}} **Skipped Containers:** {{- range .Skipped}} - **{{.Name}}** ({{.ImageName}}) - Status: `{{.State}}` - Error: `{{.Error}}` {{- end -}} {{- end}} {{- if .Failed}} **Failed Containers:** {{- range .Failed}} - **{{.Name}}** ({{.ImageName}}) - Status: `{{.State}}` - Error: `{{.Error}}` {{- end -}} {{- end}} {{- end -}} {{- end -}} {{- else -}} **General Notifications:** {{range .Entries -}} {{.Message}}{{"\n"}} {{- end -}} {{- end -}} restart: always ```parseAndFormatMessage parese & format
CHAT
correctly (without GPS, I havn't test it yet), but failed withJOIN
/LEAVE
without any error logs.