Skip to content

Commit

Permalink
Merge pull request #1942 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Dec 2, 2023
2 parents ec17f73 + 22c3873 commit b1efaf0
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 5 deletions.
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 @@ concurrency:
jobs:
ever-teams-webapp:
runs-on: buildjet-8vcpu-ubuntu-2204

environment: dev

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -21,6 +24,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- 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
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 @@ concurrency:
jobs:
ever-teams-webapp:
runs-on: buildjet-8vcpu-ubuntu-2204

environment: prod

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -21,6 +24,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- 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
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

0 comments on commit b1efaf0

Please sign in to comment.