From 35c32110059ce07e1638f153c38f084fe9c024ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wypch=C5=82o?= Date: Thu, 3 Mar 2022 11:07:23 +0100 Subject: [PATCH] Revert "switch accounts service to docker image" --- docker-compose.accounts.yml | 6 +++++- docker/accounts/Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 docker/accounts/Dockerfile diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index 7c3ed921..a3941f6b 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -20,7 +20,11 @@ services: - ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only accounts: - image: skynetlabs/skynet-accounts + build: + context: ./docker/accounts + dockerfile: Dockerfile + args: + branch: main container_name: accounts restart: unless-stopped logging: *default-logging diff --git a/docker/accounts/Dockerfile b/docker/accounts/Dockerfile new file mode 100644 index 00000000..5cbf359a --- /dev/null +++ b/docker/accounts/Dockerfile @@ -0,0 +1,22 @@ +FROM golang:1.16.7 +LABEL maintainer="SkynetLabs " + +ENV GOOS linux +ENV GOARCH amd64 + +ARG branch=main + +WORKDIR /root + +RUN git clone --single-branch --branch ${branch} https://github.com/SkynetLabs/skynet-accounts.git && \ + cd skynet-accounts && \ + go mod download && \ + make release + +ENV SKYNET_DB_HOST="localhost" +ENV SKYNET_DB_PORT="27017" +ENV SKYNET_DB_USER="username" +ENV SKYNET_DB_PASS="password" +ENV SKYNET_ACCOUNTS_PORT=3000 + +ENTRYPOINT ["skynet-accounts"]