From 32af5021cb2bf558d6a0c21b863f16755d475307 Mon Sep 17 00:00:00 2001 From: MatthieuCoder Date: Sat, 31 Dec 2022 17:43:42 +0400 Subject: [PATCH] add dockerfile --- Dockerfile | 7 ++++--- docker-compose.yaml | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d40591..339f77b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG COMPONENT + FROM clux/muslrust:stable AS chef USER root @@ -26,7 +26,8 @@ RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* # Final os FROM runtime-base AS runtime +ARG COMPONENT +ENV COMPONENT=${COMPONENT} COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/${COMPONENT} /usr/local/bin/ USER nova -ENV COMPONENT ${COMPONENT} -CMD /usr/local/bin/${COMPONENT} +ENTRYPOINT /usr/local/bin/${COMPONENT} diff --git a/docker-compose.yaml b/docker-compose.yaml index c6e8634..f671f9b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,26 @@ version: "3.3" services: cache: + image: ghcr.io/discordnova/nova/cache build: context: . args: - COMPONENT=cache + gateway: + image: ghcr.io/discordnova/nova/gateway + build: + context: . + args: + - COMPONENT=gateway + rest: + image: ghcr.io/discordnova/nova/rest + build: + context: . + args: + - COMPONENT=rest + webhook: + image: ghcr.io/discordnova/nova/webhook + build: + context: . + args: + - COMPONENT=webhook -- 2.39.5