-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
46 lines (44 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
services:
template-rust:
build:
context: .
dockerfile: Dockerfile
image: template-rust:latest
container_name: template-rust-app
volumes:
# Mount data directory for persistent storage
- ./data:/app/data
environment:
# Override database path if needed
- DATABASE_URL=/app/data/todo.db
# Uncomment if you add a web server
# ports:
# - "8080:8080"
stdin_open: true
tty: true
# Override entrypoint for interactive TUI mode
entrypoint: ["template-rust"]
command: ["tui"]
restart: unless-stopped
# Development service with live code mounting
dev:
build:
context: .
dockerfile: Dockerfile
target: builder
image: template-rust:dev
container_name: template-rust-dev
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
working_dir: /app
environment:
- DATABASE_URL=/app/todo.db
- RUST_BACKTRACE=1
stdin_open: true
tty: true
command: ["cargo", "run", "--", "tui"]
volumes:
cargo-cache:
target-cache: