You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
2.7 KiB

name: tera-direct
x-tera-service: &tera-service
image: tera/direct-mode-dev:local
restart: "no"
services:
seriald:
<<: *tera-service
command: ["tera-seriald"]
environment:
TERA_SERIALD_SOCKET: /run/tera-seriald/serial-ports.sock
TERA_SERIALD_STREAM_SOCKET: /run/tera-seriald/serial-stream.sock
TERA_SERIALD_MAPPING: /etc/tera/serial-map.json
TERA_SERIALD_HARDWARE_PROFILE: fet3568j-c
TERA_SERIALD_EVENT_QUEUE: "128"
TERA_SERIALD_REPORT_INTERVAL_SECONDS: "5"
volumes:
- serial-run:/run/tera-seriald
healthcheck:
test: ["CMD-SHELL", "test -S /run/tera-seriald/serial-ports.sock && test -S /run/tera-seriald/serial-stream.sock"]
interval: 2s
timeout: 1s
retries: 20
api:
<<: *tera-service
build:
context: ../../..
dockerfile: services/tera-api/deploy/docker/Dockerfile
command: ["tera-api"]
environment:
TERA_API_LISTEN_ADDR: 0.0.0.0:8082
TERA_API_SERIAL_SOCKET: /run/tera-seriald/serial-ports.sock
TERA_API_DIRECT_TICKET_SOCKET: /run/tera-api/direct-tickets.sock
TERA_API_ALLOW_MOCK_ACTORS: "true"
TERA_API_PASSWORD_KDF: pbkdf2-hmac-sha256
ports:
- "18080:8080"
volumes:
- api-run:/run/tera-api
- serial-run:/run/tera-seriald
depends_on:
seriald:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "test -S /run/tera-api/direct-tickets.sock"]
interval: 2s
timeout: 1s
retries: 20
sessiond:
<<: *tera-service
command: ["tera-sessiond"]
network_mode: "service:api"
environment:
TERA_SESSIOND_LISTEN_ADDR: 0.0.0.0:8081
TERA_SESSIOND_TICKET_SOCKET: /run/tera-api/direct-tickets.sock
TERA_SESSIOND_SERIAL_STREAM_SOCKET: /run/tera-seriald/serial-stream.sock
volumes:
- api-run:/run/tera-api
- serial-run:/run/tera-seriald
depends_on:
api:
condition: service_healthy
seriald:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:8081/readyz"]
interval: 2s
timeout: 2s
retries: 20
web:
<<: *tera-service
command: ["tera-web"]
network_mode: "service:api"
environment:
TERA_WEB_LISTEN_ADDR: 0.0.0.0:8080
TERA_WEB_STATIC_ROOT: /usr/share/tera-web
TERA_WEB_API_UPSTREAM: http://127.0.0.1:8082
TERA_WEB_SESSION_UPSTREAM: http://127.0.0.1:8081
depends_on:
api:
condition: service_healthy
sessiond:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:8080/"]
interval: 2s
timeout: 2s
retries: 20
volumes:
api-run:
serial-run: