Commit 9861629 1 parent 74cc110 commit 9861629 Copy full SHA for 9861629
File tree 7 files changed +133
-37
lines changed
7 files changed +133
-37
lines changed Original file line number Diff line number Diff line change 1
1
** /node_modules
2
2
target /
3
- kitsune-fe /
4
3
Dockerfile.dev
5
4
Dockerfile.prod
Original file line number Diff line number Diff line change
1
+ [cache ]
2
+ type = " in-memory"
3
+
4
+ [database ]
5
+ url = " postgres://kitsune:password@db/kitsune"
6
+ max-connections = 20
7
+
8
+ [instance ]
9
+ name = " Kitsune"
10
+ description = " https://www.youtube.com/watch?v=6lnnPnr_0SU"
11
+ character-limit = 5000
12
+ registrations-open = true
13
+
14
+ [instance .federation-filter ]
15
+ type = " deny"
16
+ domains = []
17
+
18
+ [job-queue ]
19
+ redis-url = " redis://redis"
20
+ num-workers = 20
21
+
22
+ [messaging ]
23
+ type = " in-process"
24
+
25
+ [server ]
26
+ frontend-dir = " ./kitsune-fe/dist"
27
+ max-upload-size = 5242880 # 5MB
28
+ media-proxy-enabled = false
29
+ port = 5000
30
+ prometheus-port = 9000
31
+ request-timeout-secs = 60
32
+
33
+ [search ]
34
+ type = " sql"
35
+
36
+ [storage ]
37
+ type = " fs"
38
+ upload-dir = " ./uploads"
39
+
40
+ [url ]
41
+ scheme = " http"
42
+ domain = " localhost:5000"
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ version: '3.1'
3
3
services :
4
4
backend :
5
5
image : kitsune
6
+ command :
7
+ - config.toml
6
8
ports :
7
9
- " 5000:5000"
8
10
networks :
@@ -18,6 +20,13 @@ services:
18
20
SEARCH_SERVERS : http://backend-search:8080
19
21
volumes :
20
22
- upload-data:/app/uploads
23
+ - type : bind
24
+ source : ${KITSUNE_CONFIG}
25
+ target : /app/config.toml
26
+ read_only : true
27
+ depends_on :
28
+ - db
29
+ - redis
21
30
22
31
backend-search :
23
32
image : kitsune-search
Original file line number Diff line number Diff line change 1
- FROM rust:1-alpine AS build
2
- RUN rustup default nightly
3
- RUN apk add --no-cache musl-dev
4
- COPY . /build
5
- WORKDIR /build
6
- RUN cargo -Z sparse-registry build
1
+ FROM rust:1-alpine AS base
2
+ RUN apk add --no-cache musl-dev make protobuf-dev
3
+ RUN cargo install cargo-chef
4
+ WORKDIR app
5
+
6
+ FROM base AS planner
7
+ COPY . .
8
+ RUN cargo chef prepare --recipe-path recipe.json
9
+
10
+ FROM base AS build
11
+ COPY --from=planner /app/recipe.json recipe.json
12
+ RUN cargo chef cook --recipe-path recipe.json
13
+ COPY . .
14
+ RUN cargo build --bin kitsune-search-server
7
15
8
16
FROM alpine:latest
9
- WORKDIR / app
10
- COPY --from=build /build /target/debug/kitsune-search .
11
- CMD ["/app/ kitsune-search"]
17
+ WORKDIR app
18
+ COPY --from=build /app /target/debug/kitsune-search-server .
19
+ ENTRYPOINT ["./ kitsune-search-server "]
Original file line number Diff line number Diff line change 1
- FROM rust:1-alpine AS build
2
- RUN rustup default nightly
3
- RUN apk add --no-cache musl-dev
4
- COPY . /build
5
- WORKDIR /build
6
- RUN cargo -Z sparse-registry build --release
1
+ FROM rust:1-alpine AS base
2
+ RUN apk add --no-cache musl-dev make protobuf-dev
3
+ RUN cargo install cargo-chef
4
+ WORKDIR app
5
+
6
+ FROM base AS planner
7
+ COPY . .
8
+ RUN cargo chef prepare --recipe-path recipe.json
9
+
10
+ FROM base AS build
11
+ COPY --from=planner /app/recipe.json recipe.json
12
+ RUN cargo chef cook --release --recipe-path recipe.json
13
+ COPY . .
14
+ RUN cargo build --release --bin kitsune-search-server
7
15
8
16
FROM alpine:latest
9
- WORKDIR / app
10
- COPY --from=build /build /target/release/kitsune-search .
11
- CMD ["/app/ kitsune-search"]
17
+ WORKDIR app
18
+ COPY --from=build /app /target/release/kitsune-search-server .
19
+ ENTRYPOINT ["./ kitsune-search-server "]
Original file line number Diff line number Diff line change 1
- FROM rust:1-alpine AS build
2
- RUN rustup default nightly
3
- RUN apk add --no-cache musl-dev
4
- COPY . /build
5
- WORKDIR /build
6
- RUN cargo -Z sparse-registry build
1
+ FROM rust:1-alpine AS base
2
+ RUN apk add --no-cache musl-dev make protobuf-dev
3
+ RUN cargo install cargo-chef
4
+ WORKDIR app
5
+
6
+ FROM base AS planner
7
+ COPY . .
8
+ RUN cargo chef prepare --recipe-path recipe.json
9
+
10
+ FROM base AS build
11
+ COPY --from=planner /app/recipe.json recipe.json
12
+ RUN cargo chef cook --recipe-path recipe.json
13
+ COPY . .
14
+ RUN cargo build --bin kitsune
15
+
16
+ FROM base AS frontend
17
+ RUN apk add --no-cache yarn
18
+ COPY kitsune-fe .
19
+ WORKDIR kitsune-fe
20
+ RUN yarn install && yarn build
7
21
8
22
FROM alpine:latest
9
- WORKDIR /app
10
- COPY --from=build /build/target/debug/kitsune .
11
- CMD ["/app/kitsune"]
23
+ WORKDIR app
24
+ COPY --from=build /app/target/debug/kitsune .
25
+ COPY --from=frontend /app kitsune-fe
26
+ ENTRYPOINT ["./kitsune"]
Original file line number Diff line number Diff line change 1
- FROM rust:1-alpine AS build
2
- RUN rustup default nightly
3
- RUN apk add --no-cache musl-dev
4
- COPY . /build
5
- WORKDIR /build
6
- RUN cargo -Z sparse-registry build --release
1
+ FROM rust:1-alpine AS base
2
+ RUN apk add --no-cache musl-dev make protobuf-dev
3
+ RUN cargo install cargo-chef
4
+ WORKDIR app
5
+
6
+ FROM base AS planner
7
+ COPY . .
8
+ RUN cargo chef prepare --recipe-path recipe.json
9
+
10
+ FROM base AS build
11
+ COPY --from=planner /app/recipe.json recipe.json
12
+ RUN cargo chef cook --release --recipe-path recipe.json
13
+ COPY . .
14
+ RUN cargo build --release --bin kitsune
15
+
16
+ FROM base AS frontend
17
+ RUN apk add --no-cache yarn
18
+ COPY kitsune-fe .
19
+ WORKDIR kitsune-fe
20
+ RUN yarn install && yarn build
7
21
8
22
FROM alpine:latest
9
- WORKDIR /app
10
- COPY --from=build /build/target/release/kitsune .
11
- CMD ["/app/kitsune"]
23
+ WORKDIR app
24
+ COPY --from=build /app/target/release/kitsune .
25
+ COPY --from=frontend /app kitsune-fe
26
+ ENTRYPOINT ["./kitsune"]
You can’t perform that action at this time.
0 commit comments