Merge pull request #1977 from SkynetLabs/website-docker-image

replace local docker builds with docker images
This commit is contained in:
Karol Wypchło 2022-04-07 16:24:16 +02:00 committed by GitHub
commit 45df1c9e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 25 deletions

View File

@ -82,9 +82,11 @@ services:
- website - website
website: website:
build: # uncomment "build" and comment out "image" to build from sources
context: ./packages/website # build:
dockerfile: Dockerfile # context: https://github.com/SkynetLabs/skynet-webportal.git#master
# dockerfile: ./packages/website/Dockerfile
image: skynetlabs/website
container_name: website container_name: website
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging
@ -118,9 +120,11 @@ services:
- 12037 - 12037
handshake-api: handshake-api:
build: # uncomment "build" and comment out "image" to build from sources
context: ./packages/handshake-api # build:
dockerfile: Dockerfile # context: https://github.com/SkynetLabs/skynet-webportal.git#master
# dockerfile: ./packages/handshake-api/Dockerfile
image: skynetlabs/handshake-api
container_name: handshake-api container_name: handshake-api
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging
@ -140,9 +144,11 @@ services:
- handshake - handshake
dnslink-api: dnslink-api:
build: # uncomment "build" and comment out "image" to build from sources
context: ./packages/dnslink-api # build:
dockerfile: Dockerfile # context: https://github.com/SkynetLabs/skynet-webportal.git#master
# dockerfile: ./packages/dnslink-api/Dockerfile
image: skynetlabs/dnslink-api
container_name: dnslink-api container_name: dnslink-api
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging
@ -153,9 +159,11 @@ services:
- 3100 - 3100
health-check: health-check:
build: # uncomment "build" and comment out "image" to build from sources
context: ./packages/health-check # build:
dockerfile: Dockerfile # context: https://github.com/SkynetLabs/skynet-webportal.git#master
# dockerfile: ./packages/health-check/Dockerfile
image: skynetlabs/health-check
container_name: health-check container_name: health-check
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging

View File

@ -2,11 +2,13 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app WORKDIR /usr/app
COPY package.json yarn.lock ./ COPY packages/dnslink-api/package.json \
packages/dnslink-api/yarn.lock \
./
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY src/* src/ COPY packages/dnslink-api/src/* src/
EXPOSE 3100 EXPOSE 3100
CMD ["node", "src/index.js"] CMD ["node", "src/index.js"]

View File

@ -2,11 +2,13 @@ FROM node:16.14.2-alpine
WORKDIR /usr/app WORKDIR /usr/app
COPY package.json yarn.lock ./ COPY packages/handshake-api/package.json \
packages/handshake-api/yarn.lock \
./
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY src/* src/ COPY packages/handshake-api/src/* src/
ENV HSD_NETWORK="main" ENV HSD_NETWORK="main"
ENV HSD_HOST="0.0.0.0" ENV HSD_HOST="0.0.0.0"

View File

@ -11,13 +11,15 @@ ENV PATH="/usr/app/bin:${PATH}"
RUN echo '*/5 * * * * source /etc/environment ; /usr/app/bin/cli run critical >> /proc/1/fd/1' >> /etc/crontabs/root && \ RUN echo '*/5 * * * * source /etc/environment ; /usr/app/bin/cli run critical >> /proc/1/fd/1' >> /etc/crontabs/root && \
echo '0 * * * * source /etc/environment ; /usr/app/bin/cli run extended >> /proc/1/fd/1' >> /etc/crontabs/root echo '0 * * * * source /etc/environment ; /usr/app/bin/cli run extended >> /proc/1/fd/1' >> /etc/crontabs/root
COPY package.json yarn.lock ./ COPY packages/health-check/package.json \
packages/health-check/yarn.lock \
./
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY src src COPY packages/health-check/src src
COPY cli cli COPY packages/health-check/cli cli
COPY bin bin COPY packages/health-check/bin bin
EXPOSE 3100 EXPOSE 3100
ENV NODE_ENV production ENV NODE_ENV production

View File

@ -4,16 +4,21 @@ RUN apk add --no-cache autoconf=2.71-r0 automake=1.16.4-r1 build-base=0.5-r2 lib
WORKDIR /usr/app WORKDIR /usr/app
COPY package.json yarn.lock ./ COPY packages/website/package.json \
packages/website/yarn.lock \
./
ENV GATSBY_TELEMETRY_DISABLED 1 ENV GATSBY_TELEMETRY_DISABLED 1
ENV CYPRESS_INSTALL_BINARY 0 ENV CYPRESS_INSTALL_BINARY 0
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
COPY data ./data COPY packages/website/data ./data
COPY src ./src COPY packages/website/src ./src
COPY static ./static COPY packages/website/static ./static
COPY gatsby-browser.js gatsby-config.js gatsby-node.js gatsby-ssr.js postcss.config.js tailwind.config.js ./ COPY packages/website/gatsby-*.js \
packages/website/postcss.config.js \
packages/website/tailwind.config.js \
./
RUN yarn build RUN yarn build