Merge branch 'master' into portal-latest

This commit is contained in:
Matthew Sevey 2022-04-26 10:41:11 -04:00
commit 093e6e6c66
No known key found for this signature in database
GPG Key ID: 9ADDD344F13057F6
6 changed files with 32 additions and 44 deletions

View File

@ -0,0 +1,2 @@
- Fix `dashboard-v2` Dockerfile context in `docker-compose.accounts.yml` to
avoid Ansible deploy (docker compose build) `permission denied` issues.

View File

@ -20,11 +20,9 @@ services:
- ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only
accounts:
build:
context: ./docker/accounts
dockerfile: Dockerfile
args:
branch: main
# uncomment "build" and comment out "image" to build from sources
# build: https://github.com/SkynetLabs/skynet-accounts.git#main
image: skynetlabs/skynet-accounts
container_name: accounts
restart: unless-stopped
logging: *default-logging
@ -82,8 +80,8 @@ services:
dashboard-v2:
build:
context: .
dockerfile: packages/dashboard-v2/Dockerfile
context: ./packages/dashboard-v2
dockerfile: Dockerfile
container_name: dashboard-v2
restart: unless-stopped
logging: *default-logging

View File

@ -15,7 +15,7 @@ services:
mongo:
image: mongo:4.4.1
command: --keyFile=/data/mgkey --replSet=${SKYNET_DB_REPLICASET:-skynet}
command: --keyFile=/data/mgkey --replSet=${SKYNET_DB_REPLICASET:-skynet} --setParameter ShardingTaskExecutorPoolMinSize=10
container_name: mongo
restart: unless-stopped
logging: *default-logging

View File

@ -1,22 +0,0 @@
FROM golang:1.16.7
LABEL maintainer="SkynetLabs <devs@siasky.net>"
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"]

View File

@ -2,17 +2,17 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app
COPY packages/dashboard-v2/package.json \
packages/dashboard-v2/yarn.lock \
COPY package.json \
yarn.lock \
./
RUN yarn --frozen-lockfile
COPY packages/dashboard-v2/static ./static
COPY packages/dashboard-v2/src ./src
COPY packages/dashboard-v2/gatsby*.js \
packages/dashboard-v2/postcss.config.js \
packages/dashboard-v2/tailwind.config.js \
COPY static ./static
COPY src ./src
COPY gatsby*.js \
postcss.config.js \
tailwind.config.js \
./
CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"]

View File

@ -1,15 +1,15 @@
FROM node:16.14.2-alpine
RUN apk add --no-cache autoconf=2.71-r0 automake=1.16.4-r1 build-base=0.5-r2 libtool=2.4.6-r7 nasm=2.15.05-r0 pkgconf=1.8.0-r0
# builder stage - use debian base image to avoid needing to install missing packages
FROM node:16.14.2-bullseye as builder
WORKDIR /usr/app
# disable gatsby telemetry and installing cypress binary
ENV GATSBY_TELEMETRY_DISABLED 1
ENV CYPRESS_INSTALL_BINARY 0
COPY packages/website/package.json \
packages/website/yarn.lock \
./
ENV GATSBY_TELEMETRY_DISABLED 1
ENV CYPRESS_INSTALL_BINARY 0
RUN yarn --frozen-lockfile
COPY packages/website/data ./data
@ -22,6 +22,16 @@ COPY packages/website/gatsby-*.js \
RUN yarn build
# main stage - use alpine base image to minimise the resulting image footprint
FROM node:16.14.2-alpine
WORKDIR /usr/app
# install http server for serving website files
RUN npm install --global http-server@14.1.0
COPY --from=builder /usr/app/public /usr/app/public
EXPOSE 9000
CMD ["sh", "-c", "yarn serve --host 0.0.0.0"]
CMD ["http-server", "/usr/app/public", "-s -p 9000"]