From: MatthieuCoder Date: Sat, 31 Dec 2022 13:43:42 +0000 (+0400) Subject: add dockerfile X-Git-Tag: v0.1~36 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=32af5021cb2bf558d6a0c21b863f16755d475307;p=matthieu%2Fnova.git add dockerfile --- 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