revert using image for dashboard

This commit is contained in:
Karol Wypchlo 2022-04-07 15:16:25 +02:00
parent 8bdb64e745
commit 66cdd712f0
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
3 changed files with 17 additions and 34 deletions

View File

@ -55,11 +55,9 @@ services:
- mongo - mongo
dashboard: dashboard:
# uncomment "build" and comment out "image" to build from sources build:
# build: context: ./packages/dashboard
# context: https://github.com/SkynetLabs/skynet-webportal.git#master dockerfile: Dockerfile
# 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
@ -79,11 +77,9 @@ services:
- mongo - mongo
dashboard-v2: dashboard-v2:
# uncomment "build" and comment out "image" to build from sources build:
# build: context: ./packages/dashboard-v2
# context: https://github.com/SkynetLabs/skynet-webportal.git#master dockerfile: Dockerfile
# 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,21 +2,13 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app WORKDIR /usr/app
COPY packages/dashboard-v2/package.json \ COPY package.json yarn.lock ./
packages/dashboard-v2/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 \ COPY postcss.config.js tailwind.config.js ./
packages/dashboard-v2/tailwind.config.js \
./
RUN yarn build CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"]
EXPOSE 9000
CMD ["sh", "-c", "yarn serve --host 0.0.0.0 -p 9000"]

View File

@ -2,19 +2,14 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app WORKDIR /usr/app
COPY packages/dashboard/package.json \ COPY package.json yarn.lock ./
packages/dashboard/yarn.lock \
./
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY packages/dashboard/public ./public COPY public ./public
COPY packages/dashboard/src ./src COPY src ./src
COPY packages/dashboard/styles ./styles COPY styles ./styles
COPY packages/dashboard/.eslintrc.json \ COPY .eslintrc.json postcss.config.js tailwind.config.js ./
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"]