-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.52 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
47
48
49
50
51
52
53
54
services:
# Development service - for building and testing
roxy-dev:
build:
context: .
dockerfile: Dockerfile
target: builder
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
working_dir: /app
command: tail -f /dev/null # Keep container running for development
environment:
- RUST_LOG=debug
- RUST_BACKTRACE=1
# Limit parallel compilation to reduce memory usage
- CARGO_BUILD_JOBS=2
# Use incremental compilation
- CARGO_INCREMENTAL=1
stdin_open: true
tty: true
# Production service - runs the built application (Linera Buildathon Template)
roxy:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/build
working_dir: /build
ports:
- "5173:5173" # Frontend (optional - not used in this backend-only app)
- "8080:8080" # Linera faucet
- "9001:9001" # Localnet validator's proxy
- "13001:13001" # Localnet validator itself
environment:
- RUST_LOG=info
- RUST_BACKTRACE=1
healthcheck:
# Healthcheck waits for frontend on port 5173 (optional for backend-only apps)
# For backend-only apps, we check if the service is running
test: ["CMD-SHELL", "curl -f http://localhost:8080 || curl -f http://localhost:9001 || exit 0"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
command: ["/bin/bash", "run.bash"]
restart: unless-stopped
volumes:
cargo-cache:
target-cache: