This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ /target
2
+ /vue
Original file line number Diff line number Diff line change
1
+ name : Docker
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " main"
7
+
8
+ jobs :
9
+ docker :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v3
14
+ - name : Set up QEMU
15
+ uses : docker/setup-qemu-action@v2
16
+ - name : Set up Docker Buildx
17
+ uses : docker/setup-buildx-action@v2
18
+ - name : Login to DockerHub
19
+ uses : docker/login-action@v2
20
+ with :
21
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
22
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
23
+ - name : Build and push
24
+ uses : docker/build-push-action@v3
25
+ with :
26
+ context : .
27
+ platforms : linux/amd64,linux/arm64
28
+ push : true
29
+ tags : flixcoder/gameshow:latest
Original file line number Diff line number Diff line change
1
+ FROM docker.io/rust:slim-bullseye as builder
2
+ ARG CARGO_NET_GIT_FETCH_WITH_CLI=true
3
+
4
+ RUN apt update -yqq \
5
+ && apt install -yqq --no-install-recommends \
6
+ build-essential cmake libssl-dev pkg-config git \
7
+ && rustup update \
8
+ && rustup toolchain add stable \
9
+ && rustup default stable
10
+
11
+ COPY . /app
12
+ WORKDIR /app
13
+ RUN cargo build --release
14
+
15
+
16
+ FROM debian:bullseye-slim
17
+ RUN apt update && apt install -y ca-certificates
18
+ RUN mkdir -p /opt/app
19
+ WORKDIR /opt/app
20
+
21
+ COPY --from=builder /app/target/release/gameshow-v2 /usr/local/bin/gameshow-v2
22
+ COPY --from=builder /app/questions /opt/app/questions
23
+ COPY --from=builder /app/static /opt/app/static
24
+
25
+ ENV RUST_BACKTRACE=1
26
+ ENV BIND_ADDRESS="0.0.0.0:8000"
27
+ ENV MAX_NICKNAME_LENGTH=25
28
+
29
+ CMD ["/usr/local/bin/gameshow-v2" ]
You can’t perform that action at this time.
0 commit comments