use dashboard docker images

This commit is contained in:
Karol Wypchlo 2022-04-07 14:47:49 +02:00
parent 73dad081ea
commit 7963c2cb63
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
3 changed files with 25 additions and 16 deletions

View File

@ -55,9 +55,11 @@ services:
- mongo - mongo
dashboard: dashboard:
build: # uncomment "build" and comment out "image" to build from sources
context: ./packages/dashboard # build:
dockerfile: Dockerfile # context: https://github.com/SkynetLabs/skynet-webportal.git#master
# dockerfile: ./packages/dashboard/Dockerfile
image: skynetlabs/dashboard
container_name: dashboard container_name: dashboard
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging
@ -77,9 +79,11 @@ services:
- mongo - mongo
dashboard-v2: dashboard-v2:
build: # uncomment "build" and comment out "image" to build from sources
context: ./packages/dashboard-v2 # build:
dockerfile: Dockerfile # context: https://github.com/SkynetLabs/skynet-webportal.git#master
# dockerfile: ./packages/dashboard-v2/Dockerfile
image: skynetlabs/dashboard-v2
container_name: dashboard-v2 container_name: dashboard-v2
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging

View File

@ -2,13 +2,15 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app WORKDIR /usr/app
COPY package.json yarn.lock ./ COPY packages/dashboard-v2/package.json packages/dashboard-v2/yarn.lock ./
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY static ./static COPY packages/dashboard/static ./static
COPY src ./src COPY packages/dashboard/src ./src
COPY gatsby*.js ./ COPY packages/dashboard/gatsby*.js ./
COPY postcss.config.js tailwind.config.js ./ COPY packages/dashboard/postcss.config.js \
packages/dashboard/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"]

View File

@ -2,14 +2,17 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app WORKDIR /usr/app
COPY package.json yarn.lock ./ COPY packages/dashboard/package.json packages/dashboard/yarn.lock ./
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY public ./public COPY packages/dashboard/public ./public
COPY src ./src COPY packages/dashboard/src ./src
COPY styles ./styles COPY packages/dashboard/styles ./styles
COPY .eslintrc.json postcss.config.js tailwind.config.js ./ COPY packages/dashboard/.eslintrc.json \
packages/dashboard/postcss.config.js \
packages/dashboard/tailwind.config.js \
./
CMD ["sh", "-c", "env | grep -E 'NEXT_PUBLIC|STRIPE|ACCOUNTS' > .env.local && yarn build && yarn start"] CMD ["sh", "-c", "env | grep -E 'NEXT_PUBLIC|STRIPE|ACCOUNTS' > .env.local && yarn build && yarn start"]