Compare commits
No commits in common. "4dd678531f0c2c31a52222f1546d0e5ca73517b2" and "3bdbce4985c97d7c71809ef75b45524fe43d7503" have entirely different histories.
4dd678531f
...
3bdbce4985
|
@ -1,31 +1,28 @@
|
||||||
steps:
|
steps:
|
||||||
# build:
|
build:
|
||||||
# image: alpine:edge
|
image: alpine:edge
|
||||||
# commands:
|
commands:
|
||||||
# - apk add --no-cache git nix --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
- apk add --no-cache git nix --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||||
# - nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#default
|
- nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#default
|
||||||
|
|
||||||
# build-docker-image:
|
|
||||||
# image: alpine:edge
|
|
||||||
# commands:
|
|
||||||
# - apk add --no-cache git nix --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
|
||||||
# - echo "system-features = nixos-test benchmark big-parallel uid-range kvm" > /etc/nix/nix.conf
|
|
||||||
# - nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#docker
|
|
||||||
|
|
||||||
build-docker-image:
|
build-docker-image:
|
||||||
image: docker
|
when:
|
||||||
|
event: [tag, deployment]
|
||||||
|
environment: prod
|
||||||
|
image: alpine:edge
|
||||||
commands:
|
commands:
|
||||||
- docker build --rm -t .
|
- echo "system-features = nixos-test benchmark big-parallel uid-range kvm" > /etc/nix/nix.conf
|
||||||
|
- nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#docker
|
||||||
|
|
||||||
# publish-image:
|
publish-image:
|
||||||
# when:
|
when:
|
||||||
# event: [tag, deployment]
|
event: [tag, deployment]
|
||||||
# environment: prod
|
environment: prod
|
||||||
# image: git.spacegirl.nl/patrick/plugin-artifact
|
image: git.spacegirl.nl/patrick/plugin-artifact
|
||||||
# settings:
|
settings:
|
||||||
# tag: $CI_COMMIT_TAG
|
tag: $CI_COMMIT_TAG
|
||||||
# user: patrick
|
user: patrick
|
||||||
# password:
|
password:
|
||||||
# from_secret: forgejo_token
|
from_secret: forgejo_token
|
||||||
# repo: $CI_REPO
|
repo: $CI_REPO
|
||||||
# image_tar: result
|
image_tar: result
|
||||||
|
|
31
Dockerfile
31
Dockerfile
|
@ -1,31 +0,0 @@
|
||||||
FROM rust-1.73.0-slim AS builder
|
|
||||||
|
|
||||||
RUN USER=root cargo new --bin memejoin-docker
|
|
||||||
WORKDIR ./memejoin-docker
|
|
||||||
COPY ./Cargo.toml ./Cargo.toml
|
|
||||||
RUN cargo build --release
|
|
||||||
RUN rm src/*.rs
|
|
||||||
|
|
||||||
ADD . ./
|
|
||||||
|
|
||||||
RUN rm ./target/release/deps/memejoin-docker
|
|
||||||
RUN cargo build --release
|
|
||||||
|
|
||||||
FROM debian:buster-slim
|
|
||||||
ARG APP=/usr/src/app
|
|
||||||
|
|
||||||
RUN apt update \
|
|
||||||
&& apt install -y ca-certificates cmake gcc libopus libssl openssl pkg-config \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
EXPOSE 8100
|
|
||||||
|
|
||||||
RUN groupadd $APP_USER && useradd -g $APP_USER $APP_USER && mkdir -p ${APP}
|
|
||||||
COPY --from=builder /memejoin-docker/target/release/memejoin-docker ${APP}/memejoin-docker
|
|
||||||
|
|
||||||
RUN chown -R $APP_USER:$APP_USER ${APP}
|
|
||||||
|
|
||||||
USER $APP_USER
|
|
||||||
WORKDIR ${APP}
|
|
||||||
|
|
||||||
CMD ["./memejoin-docker"]
|
|
|
@ -1 +1 @@
|
||||||
nightly-2023-07-27
|
nightly
|
||||||
|
|
Loading…
Reference in New Issue