Merge branch 'master' into portal-latest
This commit is contained in:
commit
093e6e6c66
|
@ -0,0 +1,2 @@
|
||||||
|
- Fix `dashboard-v2` Dockerfile context in `docker-compose.accounts.yml` to
|
||||||
|
avoid Ansible deploy (docker compose build) `permission denied` issues.
|
|
@ -20,11 +20,9 @@ services:
|
||||||
- ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only
|
- ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only
|
||||||
|
|
||||||
accounts:
|
accounts:
|
||||||
build:
|
# uncomment "build" and comment out "image" to build from sources
|
||||||
context: ./docker/accounts
|
# build: https://github.com/SkynetLabs/skynet-accounts.git#main
|
||||||
dockerfile: Dockerfile
|
image: skynetlabs/skynet-accounts
|
||||||
args:
|
|
||||||
branch: main
|
|
||||||
container_name: accounts
|
container_name: accounts
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
@ -82,8 +80,8 @@ services:
|
||||||
|
|
||||||
dashboard-v2:
|
dashboard-v2:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: ./packages/dashboard-v2
|
||||||
dockerfile: packages/dashboard-v2/Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: dashboard-v2
|
container_name: dashboard-v2
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
|
@ -15,7 +15,7 @@ services:
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:4.4.1
|
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
|
container_name: mongo
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
|
@ -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"]
|
|
|
@ -2,17 +2,17 @@ FROM node:16.14.2-alpine
|
||||||
|
|
||||||
WORKDIR /usr/app
|
WORKDIR /usr/app
|
||||||
|
|
||||||
COPY packages/dashboard-v2/package.json \
|
COPY package.json \
|
||||||
packages/dashboard-v2/yarn.lock \
|
yarn.lock \
|
||||||
./
|
./
|
||||||
|
|
||||||
RUN yarn --frozen-lockfile
|
RUN yarn --frozen-lockfile
|
||||||
|
|
||||||
COPY packages/dashboard-v2/static ./static
|
COPY static ./static
|
||||||
COPY packages/dashboard-v2/src ./src
|
COPY src ./src
|
||||||
COPY packages/dashboard-v2/gatsby*.js \
|
COPY gatsby*.js \
|
||||||
packages/dashboard-v2/postcss.config.js \
|
postcss.config.js \
|
||||||
packages/dashboard-v2/tailwind.config.js \
|
tailwind.config.js \
|
||||||
./
|
./
|
||||||
|
|
||||||
CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"]
|
CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
FROM node:16.14.2-alpine
|
# builder stage - use debian base image to avoid needing to install missing packages
|
||||||
|
FROM node:16.14.2-bullseye as builder
|
||||||
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
|
|
||||||
|
|
||||||
WORKDIR /usr/app
|
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 \
|
COPY packages/website/package.json \
|
||||||
packages/website/yarn.lock \
|
packages/website/yarn.lock \
|
||||||
./
|
./
|
||||||
|
|
||||||
ENV GATSBY_TELEMETRY_DISABLED 1
|
|
||||||
ENV CYPRESS_INSTALL_BINARY 0
|
|
||||||
RUN yarn --frozen-lockfile
|
RUN yarn --frozen-lockfile
|
||||||
|
|
||||||
COPY packages/website/data ./data
|
COPY packages/website/data ./data
|
||||||
|
@ -22,6 +22,16 @@ COPY packages/website/gatsby-*.js \
|
||||||
|
|
||||||
RUN yarn build
|
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
|
EXPOSE 9000
|
||||||
|
|
||||||
CMD ["sh", "-c", "yarn serve --host 0.0.0.0"]
|
CMD ["http-server", "/usr/app/public", "-s -p 9000"]
|
||||||
|
|
Reference in New Issue