mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
feat: add Docker setup with Dockerfile and docker-compose
Co-authored-by: aider (openai/gpt-5) <aider@aider.chat>
This commit is contained in:
parent
5ba0421f76
commit
4d34f11b87
3 changed files with 95 additions and 0 deletions
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: ntp_timeturner:latest
|
||||
container_name: ntp_timeturner
|
||||
environment:
|
||||
- RUST_LOG=info
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./static:/app/static:ro
|
||||
restart: unless-stopped
|
||||
|
||||
# Optional: probe a PTP hardware clock (Linux host with /dev/ptp0)
|
||||
ptp-probe:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: ntp_timeturner:latest
|
||||
profiles:
|
||||
- hw
|
||||
command: ["ptp_probe", "--device", "/dev/ptp0", "--interval", "1.0", "--count", "0"]
|
||||
devices:
|
||||
- "/dev/ptp0:/dev/ptp0"
|
||||
restart: "no"
|
||||
Loading…
Add table
Add a link
Reference in a new issue