-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7216 from ever-co/develop
Release
- Loading branch information
Showing
9 changed files
with
546 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,8 @@ LABEL org.opencontainers.image.source https://github.com/ever-co/ever-gauzy | |
|
||
ENV CI=true | ||
|
||
# ENV NODE_ENV=${NODE_ENV:-production} | ||
|
||
# Set Python interpreter for `node-gyp` to use | ||
ENV PYTHON /usr/bin/python | ||
|
||
|
@@ -141,11 +143,14 @@ COPY --chown=node:node packages/plugins/changelog/package.json ./packages/plugin | |
|
||
COPY --chown=node:node decorate-angular-cli.js lerna.json package.json yarn.lock ./ | ||
|
||
RUN yarn install --network-timeout 1000000 --frozen-lockfile && yarn cache clean | ||
RUN yarn install --network-timeout 1000000 --frozen-lockfile | ||
# RUN apk del build-dependencies make gcc g++ python2 py2-setuptools vips-dev | ||
|
||
FROM node:18-alpine3.17 AS prodDependencies | ||
|
||
ENV CI=true | ||
ENV NODE_ENV=${NODE_ENV:-production} | ||
|
||
# Set Python interpreter for `node-gyp` to use | ||
ENV PYTHON /usr/bin/python | ||
|
||
|
@@ -186,7 +191,7 @@ COPY --chown=node:node packages/plugins/changelog/package.json ./packages/plugin | |
|
||
COPY --chown=node:node package.json yarn.lock ./ | ||
|
||
RUN yarn install --network-timeout 1000000 --frozen-lockfile --production && yarn cache clean | ||
RUN yarn install --network-timeout 1000000 --frozen-lockfile --production | ||
# RUN apk del build-dependencies make gcc g++ python2 py2-setuptools vips-dev | ||
|
||
RUN rm -r node_modules/@angular | ||
|
@@ -207,8 +212,13 @@ WORKDIR /srv/gauzy | |
|
||
RUN mkdir dist | ||
|
||
# Copy the node_modules from the dependencies stage | ||
COPY --from=dependencies /srv/gauzy/node_modules ./node_modules | ||
|
||
# Copy the compiled packages from the development stage | ||
COPY --chown=node:node --from=development /srv/gauzy . | ||
|
||
ENV CI=true | ||
ENV NODE_OPTIONS=${NODE_OPTIONS:-"--max-old-space-size=30000"} | ||
ENV NODE_ENV=${NODE_ENV:-production} | ||
ENV DEMO=${DEMO:-false} | ||
|
@@ -218,7 +228,7 @@ ENV IS_DOCKER=true | |
# Temporary disable caching in NX Cloud for builds | ||
ENV NX_NO_CLOUD=true | ||
|
||
RUN yarn build:package:api | ||
RUN yarn build:package:api:prod | ||
RUN yarn build:api:prod:docker | ||
|
||
FROM node:18-alpine3.17 AS production | ||
|
@@ -247,8 +257,12 @@ RUN npm install [email protected] -g && \ | |
touch ormlogs.log && chown node:node ormlogs.log && chown node:node wait && \ | ||
chmod +x wait entrypoint.compose.sh entrypoint.prod.sh && chown -R node:node apps/ | ||
|
||
# Clean up | ||
RUN yarn cache clean | ||
|
||
USER node:node | ||
|
||
ENV CI=true | ||
ENV NODE_OPTIONS=${NODE_OPTIONS:-"--max-old-space-size=7000"} | ||
ENV NODE_ENV=${NODE_ENV:-production} | ||
ENV API_HOST=${API_HOST:-api} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,155 +1,159 @@ | ||
name: Build and Publish Docker Images Demo | ||
|
||
on: | ||
push: | ||
branches: [develop, temp] | ||
push: | ||
branches: [develop, temp] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
gauzy-api: | ||
runs-on: buildjet-8vcpu-ubuntu-2204 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./.deploy/api/Dockerfile | ||
load: true | ||
platforms: linux/amd64 | ||
tags: | | ||
ghcr.io/ever-co/gauzy-api-demo:latest | ||
everco/gauzy-api-demo:latest | ||
registry.digitalocean.com/ever/gauzy-api-demo:latest | ||
${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-api-demo:latest | ||
cache-from: type=registry,ref=everco/gauzy-api-demo:latest | ||
cache-to: type=inline | ||
|
||
- name: Docker images list | ||
run: | | ||
sudo docker image list | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push to Docker Hub Registry | ||
run: | | ||
docker push everco/gauzy-api-demo:latest | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Log in to DigitalOcean Container Registry with short-lived credentials | ||
run: doctl registry login --expiry-seconds 3600 | ||
|
||
- name: Push to DigitalOcean Registry | ||
run: | | ||
docker push registry.digitalocean.com/ever/gauzy-api-demo:latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Push to Github Registry | ||
run: | | ||
docker push ghcr.io/ever-co/gauzy-api-demo:latest | ||
- name: Login to CW Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.CW_DOCKER_REGISTRY }} | ||
username: ${{ secrets.CW_DOCKER_USER }} | ||
password: ${{ secrets.CW_DOCKER_USER_PASSWORD }} | ||
|
||
- name: Push to CW Registry | ||
run: | | ||
docker push ${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-api-demo:latest | ||
gauzy-webapp: | ||
runs-on: buildjet-8vcpu-ubuntu-2204 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./.deploy/webapp/Dockerfile | ||
load: true | ||
tags: | | ||
ghcr.io/ever-co/gauzy-webapp-demo:latest | ||
everco/gauzy-webapp-demo:latest | ||
registry.digitalocean.com/ever/gauzy-webapp-demo:latest | ||
${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-webapp-demo:latest | ||
cache-from: type=registry,ref=everco/gauzy-webapp-demo:latest | ||
cache-to: type=inline | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push to Docker Hub Registry | ||
run: | | ||
docker push everco/gauzy-webapp-demo:latest | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Log in to DigitalOcean Container Registry with short-lived credentials | ||
run: doctl registry login --expiry-seconds 3600 | ||
|
||
- name: Push to DigitalOcean Registry | ||
run: | | ||
docker push registry.digitalocean.com/ever/gauzy-webapp-demo:latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Push to Github Registry | ||
run: | | ||
docker push ghcr.io/ever-co/gauzy-webapp-demo:latest | ||
- name: Login to CW Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.CW_DOCKER_REGISTRY }} | ||
username: ${{ secrets.CW_DOCKER_USER }} | ||
password: ${{ secrets.CW_DOCKER_USER_PASSWORD }} | ||
|
||
- name: Push to CW Registry | ||
run: | | ||
docker push ${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-webapp-demo:latest | ||
gauzy-api: | ||
runs-on: buildjet-8vcpu-ubuntu-2204 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./.deploy/api/Dockerfile | ||
load: true | ||
platforms: linux/amd64 | ||
tags: | | ||
ghcr.io/ever-co/gauzy-api-demo:latest | ||
everco/gauzy-api-demo:latest | ||
registry.digitalocean.com/ever/gauzy-api-demo:latest | ||
${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-api-demo:latest | ||
cache-from: type=registry,ref=everco/gauzy-api-demo:latest | ||
cache-to: type=inline | ||
build-args: | | ||
NODE_ENV=development | ||
- name: Docker images list | ||
run: | | ||
sudo docker image list | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push to Docker Hub Registry | ||
run: | | ||
docker push everco/gauzy-api-demo:latest | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Log in to DigitalOcean Container Registry with short-lived credentials | ||
run: doctl registry login --expiry-seconds 3600 | ||
|
||
- name: Push to DigitalOcean Registry | ||
run: | | ||
docker push registry.digitalocean.com/ever/gauzy-api-demo:latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Push to Github Registry | ||
run: | | ||
docker push ghcr.io/ever-co/gauzy-api-demo:latest | ||
- name: Login to CW Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.CW_DOCKER_REGISTRY }} | ||
username: ${{ secrets.CW_DOCKER_USER }} | ||
password: ${{ secrets.CW_DOCKER_USER_PASSWORD }} | ||
|
||
- name: Push to CW Registry | ||
run: | | ||
docker push ${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-api-demo:latest | ||
gauzy-webapp: | ||
runs-on: buildjet-8vcpu-ubuntu-2204 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./.deploy/webapp/Dockerfile | ||
load: true | ||
tags: | | ||
ghcr.io/ever-co/gauzy-webapp-demo:latest | ||
everco/gauzy-webapp-demo:latest | ||
registry.digitalocean.com/ever/gauzy-webapp-demo:latest | ||
${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-webapp-demo:latest | ||
cache-from: type=registry,ref=everco/gauzy-webapp-demo:latest | ||
cache-to: type=inline | ||
build-args: | | ||
NODE_ENV=development | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push to Docker Hub Registry | ||
run: | | ||
docker push everco/gauzy-webapp-demo:latest | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Log in to DigitalOcean Container Registry with short-lived credentials | ||
run: doctl registry login --expiry-seconds 3600 | ||
|
||
- name: Push to DigitalOcean Registry | ||
run: | | ||
docker push registry.digitalocean.com/ever/gauzy-webapp-demo:latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Push to Github Registry | ||
run: | | ||
docker push ghcr.io/ever-co/gauzy-webapp-demo:latest | ||
- name: Login to CW Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.CW_DOCKER_REGISTRY }} | ||
username: ${{ secrets.CW_DOCKER_USER }} | ||
password: ${{ secrets.CW_DOCKER_USER_PASSWORD }} | ||
|
||
- name: Push to CW Registry | ||
run: | | ||
docker push ${{ secrets.CW_DOCKER_REGISTRY }}/ever-co/gauzy-webapp-demo:latest |
Oops, something went wrong.