87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
version: "3.8"
|
|
|
|
x-default-logging: &default-logging
|
|
logging:
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "5"
|
|
driver: json-file
|
|
|
|
x-ignition-opts: &ignition-opts
|
|
<<: *default-logging
|
|
image: inductiveautomation/ignition:${IGNITION_VERSION:-latest}
|
|
env_file: gw-init/gateway.env
|
|
secrets:
|
|
- gateway-admin-password
|
|
|
|
name: PCTest
|
|
services:
|
|
pctp-proxy:
|
|
image: traefik:v2.11
|
|
container_name: pctp-proxy
|
|
restart: always
|
|
ports:
|
|
- 80:80
|
|
command:
|
|
- --configFile=/etc/traefik/traefik.yml
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.http.routers.pctp-proxy.entrypoints: "web"
|
|
traefik.http.routers.pctp-proxy.rule: "Host(`pctp-proxy.localtest.me`)"
|
|
traefik.http.routers.pctp-proxy.service: "api@internal"
|
|
volumes:
|
|
- ./traefik-config/traefik.yml:/etc/traefik/traefik.yml:ro
|
|
- ./traefik-config/dynamic.yml:/etc/traefik/dynamic.yml:ro
|
|
networks:
|
|
- proxy
|
|
healthcheck:
|
|
test: [ "CMD", "traefik", "healthcheck", "--ping" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 5s
|
|
PCTPgateway:
|
|
depends_on:
|
|
pctp-proxy:
|
|
condition: service_healthy
|
|
<<: *ignition-opts
|
|
build:
|
|
context: .
|
|
args:
|
|
- IGNITION_VERSION=${IGNITION_VERSION:-8.3.2}
|
|
dockerfile: ./gw-build/Dockerfile # Edit this file to add new third party modules
|
|
user: 0:0
|
|
container_name: PCTPgateway
|
|
pull_policy: missing
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.http.routers.PCTPgateway.entrypoints: "web"
|
|
traefik.http.routers.PCTPgateway.rule: "Host(`${GATEWAY1_HOSTNAME}`)"
|
|
traefik.http.services.PCTPgateway.loadbalancer.server.port: "8088"
|
|
ports:
|
|
- 8088:8088 # Main Ignition Web Port
|
|
- 1883:1883 # Main MQTT Port
|
|
- 8060:8060 # Main Ignition Gateway Port
|
|
# Reference Ignition Documentation for reference to these commands and their uses.
|
|
command: >
|
|
-n PCTestingPlatform -m ${GATEWAY_MAX_MEMORY:-1024}
|
|
volumes:
|
|
- ./projects:/usr/local/bin/ignition/data/projects:rw
|
|
- ./gw-config:/usr/local/bin/ignition/data/config:rw
|
|
- ./gw-commission/commissioning.json:/usr/local/bin/ignition/data/commissioning.json
|
|
networks:
|
|
- proxy
|
|
|
|
networks:
|
|
proxy:
|
|
name: proxy
|
|
# external: true
|
|
|
|
secrets:
|
|
gateway-admin-password:
|
|
file: gw-secret/GATEWAY_ADMIN_PASSWORD
|
|
|
|
volumes:
|
|
logs:
|
|
driver: local
|