Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1942

Merged
merged 4 commits into from
Dec 2, 2023
Merged

Release #1942

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/docker-build-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
jobs:
ever-teams-webapp:
runs-on: buildjet-8vcpu-ubuntu-2204

environment: dev

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -18,9 +21,12 @@
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx

Check warning on line 24 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Buildx)
uses: docker/setup-buildx-action@v2

Check warning on line 25 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (buildx)

- name: Output NEXT_PUBLIC_GAUZY_API_SERVER_URL
run: echo "NEXT_PUBLIC_GAUZY_API_SERVER_URL=${{ secrets.NEXT_PUBLIC_GAUZY_API_SERVER_URL }}"

- name: Build and push
uses: docker/build-push-action@v4
with:
Expand Down Expand Up @@ -55,20 +61,20 @@
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}

Check warning on line 64 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (DOCKERHUB)
password: ${{ secrets.DOCKERHUB_TOKEN }}

Check warning on line 65 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (DOCKERHUB)

- name: Push to Docker Hub Registry
run: |
docker push everco/ever-teams-webapp-dev:latest

- name: Install doctl

Check warning on line 71 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (doctl)
uses: digitalocean/action-doctl@v2

Check warning on line 72 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (doctl)
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 3600

Check warning on line 77 in .github/workflows/docker-build-publish-dev.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (doctl)

- name: Push to DigitalOcean Registry
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docker-build-publish-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
jobs:
ever-teams-webapp:
runs-on: buildjet-8vcpu-ubuntu-2204

environment: prod

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -18,9 +21,12 @@
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx

Check warning on line 24 in .github/workflows/docker-build-publish-prod.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Buildx)
uses: docker/setup-buildx-action@v2

Check warning on line 25 in .github/workflows/docker-build-publish-prod.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (buildx)

- name: Output NEXT_PUBLIC_GAUZY_API_SERVER_URL
run: echo "NEXT_PUBLIC_GAUZY_API_SERVER_URL=${{ secrets.NEXT_PUBLIC_GAUZY_API_SERVER_URL }}"

- name: Build and push
uses: docker/build-push-action@v4
with:
Expand Down Expand Up @@ -55,7 +61,7 @@
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}

Check warning on line 64 in .github/workflows/docker-build-publish-prod.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (DOCKERHUB)
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push to Docker Hub Registry
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ ARG NEXT_PUBLIC_CHATWOOT_API_KEY

FROM node:${NODE_VERSION}-slim as base

# Output the environment variable value
RUN echo "NEXT_PUBLIC_GAUZY_API_SERVER_URL=${NEXT_PUBLIC_GAUZY_API_SERVER_URL}"

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source https://github.com/ever-co/ever-teams

Expand Down Expand Up @@ -78,6 +81,8 @@ COPY . .

ENV NODE_ENV=production

RUN echo $NEXT_PUBLIC_GAUZY_API_SERVER_URL

# Build application
RUN yarn run build:web

Expand Down
6 changes: 2 additions & 4 deletions Layerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ RUN apt-get update && \
apt-get update && \
apt-get install docker-ce docker-ce-cli containerd.io

COPY . .
RUN REPEATABLE docker pull everco/ever-teams-webapp

RUN REPEATABLE docker build -t ever-teams .

RUN REPEATABLE docker run -d -p 3000:3000 ever-teams && sleep 5
RUN REPEATABLE docker run -d -p 3000:3000 everco/ever-teams-webapp && sleep 5

EXPOSE WEBSITE localhost:3000
22 changes: 22 additions & 0 deletions Layerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM vm/ubuntu:18.04

MEMORY 8G

# install the latest version of Docker, as in the official Docker installation tutorial.
RUN apt-get update && \
apt-get install ca-certificates curl gnupg lsb-release && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |\
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
apt-get install docker-ce docker-ce-cli containerd.io

COPY . .

RUN REPEATABLE docker build -t ever-teams .

RUN REPEATABLE docker run -d -p 3000:3000 ever-teams && sleep 5

EXPOSE WEBSITE localhost:3000
22 changes: 22 additions & 0 deletions Layerfile.node
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM vm/ubuntu:22.04

ENV NODE_MAJOR=20

# install the latest version of Docker, as in the official Docker installation tutorial.
RUN apt-get update &&\
apt-get install -y ca-certificates curl gnupg &&\
sudo mkdir -p /etc/apt/keyrings &&\
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg &&\
echo \
"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" |\
sudo tee /etc/apt/sources.list.d/nodesource.list &&\
apt-get update &&\
apt-get install nodejs yarn -y

COPY . .

RUN REPEATABLE cd apps/web && yarn install && yarn build

RUN BACKGROUND yarn start:web

EXPOSE WEBSITE localhost:3000
1 change: 0 additions & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');

console.log(`GAUZY_API_SERVER_URL: ${process.env.GAUZY_API_SERVER_URL}`);
console.log(`NEXT_PUBLIC_GAUZY_API_SERVER_URL: ${process.env.NEXT_PUBLIC_GAUZY_API_SERVER_URL}`);

// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
Loading