From 446049986c815da8dc644152e2d730dba9ad794c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 17:33:26 +0200 Subject: [PATCH] Revert "Merge pull request #1917 from SkynetLabs/use-accounts-image" This reverts commit f3ec613a5aea5a31ecfa9e66426067e29401ed71, reversing changes made to 25d573b9bad6aa437190c3b0f202b75d32536e60. --- docker-compose.accounts.yml | 8 +++++--- docker/accounts/Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 docker/accounts/Dockerfile diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index b154bac7..e4806e91 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -20,9 +20,11 @@ services: - ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only accounts: - # uncomment "build" and comment out "image" to build from sources - # build: https://github.com/SkynetLabs/skynet-accounts.git#main - 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"]