Spaces:
Runtime error
Runtime error
neon_arch
commited on
Commit
β’
62fdbfe
1
Parent(s):
e16f7a5
π§ refactor: add documentation for the new set of commands (#286)
Browse files- Dockerfile +14 -0
- docker-compose.yml +10 -9
Dockerfile
CHANGED
@@ -12,11 +12,25 @@ RUN cargo chef prepare --recipe-path recipe.json
|
|
12 |
FROM chef AS builder
|
13 |
COPY --from=planner /app/recipe.json recipe.json
|
14 |
# Build dependencies - this is the caching Docker layer!
|
|
|
|
|
|
|
15 |
RUN cargo chef cook --release --recipe-path recipe.json
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Build application
|
18 |
COPY . .
|
|
|
|
|
|
|
19 |
RUN cargo install --path .
|
|
|
|
|
|
|
|
|
20 |
|
21 |
# We do not need the Rust toolchain to run the binary!
|
22 |
FROM gcr.io/distroless/cc-debian12
|
|
|
12 |
FROM chef AS builder
|
13 |
COPY --from=planner /app/recipe.json recipe.json
|
14 |
# Build dependencies - this is the caching Docker layer!
|
15 |
+
# Uncomment the line below if you want to use the `hybrid` caching feature.
|
16 |
+
# RUN cargo chef cook --release --features redis-cache --recipe-path recipe.json
|
17 |
+
# Comment the line below if you don't want to use the `In-Memory` caching feature.
|
18 |
RUN cargo chef cook --release --recipe-path recipe.json
|
19 |
+
# Uncomment the line below if you want to use the `no cache` feature.
|
20 |
+
# RUN cargo chef cook --release --no-default-features --recipe-path recipe.json
|
21 |
+
# Uncomment the line below if you want to use the `redis` caching feature.
|
22 |
+
# RUN cargo chef cook --release --no-default-features --features redis-cache --recipe-path recipe.json
|
23 |
|
24 |
# Build application
|
25 |
COPY . .
|
26 |
+
# Uncomment the line below if you want to use the `hybrid` caching feature.
|
27 |
+
# RUN cargo install --path . --features redis-cache
|
28 |
+
# Comment the line below if you don't want to use the `In-Memory` caching feature.
|
29 |
RUN cargo install --path .
|
30 |
+
# Uncomment the line below if you want to use the `no cache` feature.
|
31 |
+
# RUN cargo install --path . --no-default-features
|
32 |
+
# Uncomment the line below if you want to use the `redis` caching feature.
|
33 |
+
# RUN cargo install --path . --no-default-features --features redis-cache
|
34 |
|
35 |
# We do not need the Rust toolchain to run the binary!
|
36 |
FROM gcr.io/distroless/cc-debian12
|
docker-compose.yml
CHANGED
@@ -6,14 +6,15 @@ services:
|
|
6 |
build: .
|
7 |
ports:
|
8 |
- 8080:8080
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
volumes:
|
14 |
- ./websurfx/:/etc/xdg/websurfx/
|
15 |
-
|
16 |
-
redis:
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
6 |
build: .
|
7 |
ports:
|
8 |
- 8080:8080
|
9 |
+
# Uncomment the following lines if you are using the `hybrid` or `redis` caching feature.
|
10 |
+
# depends_on:
|
11 |
+
# - redis
|
12 |
+
# links:
|
13 |
+
# - redis
|
14 |
volumes:
|
15 |
- ./websurfx/:/etc/xdg/websurfx/
|
16 |
+
# Uncomment the following lines if you are using the `hybrid` or `redis` caching feature.
|
17 |
+
# redis:
|
18 |
+
# image: redis:latest
|
19 |
+
# ports:
|
20 |
+
# - 6379:6379
|