forked from b.peck/BAT
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
services:
|
|
ignition:
|
|
image: inductiveautomation/ignition:8.3.7
|
|
container_name: buildathon-ignition
|
|
ports:
|
|
- "8088:8088"
|
|
environment:
|
|
ACCEPT_IGNITION_EULA: "Y"
|
|
GATEWAY_ADMIN_USERNAME: admin
|
|
GATEWAY_ADMIN_PASSWORD: password
|
|
IGNITION_EDITION: standard
|
|
DISABLE_QUICKSTART: "true"
|
|
# Run the gateway as the HOST dev uid/gid (primebench pattern): started
|
|
# as root (user 0:0), the official entrypoint chowns the bind mounts to
|
|
# IGNITION_UID/GID and drops privileges — repo-mapped gateway files stay
|
|
# owned by you, so host-side edits need no chown dance (WSL2 included).
|
|
IGNITION_UID: "${IGNITION_UID:-1000}"
|
|
IGNITION_GID: "${IGNITION_GID:-1000}"
|
|
TZ: America/Chicago
|
|
user: "0:0"
|
|
# Runtime args: gateway name + 2GB max JVM heap (8.3 uses the -m flag, not an env var)
|
|
command: >
|
|
-n buildathon
|
|
-m 2048
|
|
volumes:
|
|
# Gateway-as-files (primebench/TestingPlatform pattern): commissioning is
|
|
# a version-controlled FILE and only the durable state (config/, projects/)
|
|
# is bind-mounted from the repo — a container recreate can never wipe it
|
|
# and the gateway never re-commissions. Internal db/var/logs stay
|
|
# ephemeral in-container. Gateway config, tags, timers, and Perspective
|
|
# views are therefore ordinary files under ignition/gateway/.
|
|
- ./ignition/gateway/commission/commissioning.json:/usr/local/bin/ignition/data/commissioning.json
|
|
- ./ignition/gateway/config:/usr/local/bin/ignition/data/config
|
|
- ./ignition/gateway/projects:/usr/local/bin/ignition/data/projects
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- buildathon
|
|
|
|
db:
|
|
image: mariadb:11.8
|
|
container_name: buildathon-db
|
|
environment:
|
|
MARIADB_ROOT_PASSWORD: password
|
|
MARIADB_DATABASE: ignition
|
|
MARIADB_USER: ignition
|
|
MARIADB_PASSWORD: ignition
|
|
ports:
|
|
# localhost only, for inspecting with a SQL client
|
|
- "127.0.0.1:3306:3306"
|
|
volumes:
|
|
- db-data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
start_period: 15s
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
restart: unless-stopped
|
|
networks:
|
|
- buildathon
|
|
|
|
networks:
|
|
buildathon:
|
|
|
|
volumes:
|
|
db-data:
|