-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (34 loc) · 741 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
37 lines (34 loc) · 741 Bytes
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
version: '3.8'
services:
# Development service
blogr-dev:
build:
context: .
dockerfile: Dockerfile
target: builder
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
working_dir: /app
ports:
- "3000:3000"
environment:
- RUST_LOG=debug
- RUST_BACKTRACE=1
command: cargo run --bin blogr -- serve --host 0.0.0.0 --port 3000
# Production service
blogr:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./blog-data:/home/blogr/blog
environment:
- RUST_LOG=info
command: blogr serve --host 0.0.0.0 --port 3000
volumes:
cargo-cache:
target-cache: