-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/ever-co/ever-teams into …
…fix/get-api-performance
- Loading branch information
Showing
66 changed files
with
3,344 additions
and
702 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
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
2 changes: 1 addition & 1 deletion
2
.github/workflows/web.dev.yml → .github/workflows/deploy-vercel-dev.yml
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,4 +1,4 @@ | ||
name: Web Build & Deploy DEV | ||
name: Web Build & Vercel Deploy DEV | ||
on: | ||
push: | ||
branches: | ||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/web.prod.yml → .github/workflows/deploy-vercel-prod.yml
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,4 +1,4 @@ | ||
name: Web Build & Deploy PROD | ||
name: Web Build & Vercel Deploy PROD | ||
on: | ||
push: | ||
branches: | ||
|
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
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
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,9 +1,32 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
# Adjust NODE_VERSION as desired | ||
# Ever Teams Platform | ||
|
||
ARG NODE_VERSION=18.17.1 | ||
ARG NEXT_PUBLIC_GAUZY_API_SERVER_URL=https://api.gauzy.co | ||
ARG NEXT_PUBLIC_GA_MEASUREMENT_ID | ||
ARG NEXT_PUBLIC_CAPTCHA_SITE_KEY | ||
ARG NEXT_PUBLIC_DISABLE_AUTO_REFRESH=false | ||
ARG NEXT_PUBLIC_COOKIE_DOMAINS=ever.team | ||
ARG NEXT_PUBLIC_BOARD_APP_DOMAIN=https://board.ever.team | ||
ARG NEXT_PUBLIC_BOARD_BACKEND_POST_URL=https://jsonboard.ever.team/api/v2/post/ | ||
ARG NEXT_PUBLIC_BOARD_FIREBASE_CONFIG | ||
ARG NEXT_PUBLIC_MEET_DOMAIN=https://meet.ever.team | ||
ARG NEXT_PUBLIC_SENTRY_DSN | ||
ARG NEXT_PUBLIC_SENTRY_DEBUG | ||
ARG NEXT_PUBLIC_JITSU_BROWSER_URL | ||
ARG NEXT_PUBLIC_JITSU_BROWSER_WRITE_KEY | ||
ARG NEXT_PUBLIC_GITHUB_APP_NAME=ever-github | ||
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 | ||
|
||
# Next.js app lives here | ||
WORKDIR /app | ||
|
||
|
@@ -14,17 +37,33 @@ ENV NEXT_SHARP_PATH=/temp/node_modules/sharp | |
RUN npm i -g npm@latest | ||
# Install sharp, NextJS image optimization | ||
RUN mkdir /temp && cd /temp && \ | ||
npm i sharp | ||
npm i sharp | ||
|
||
RUN npm cache clean --force | ||
|
||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base as build | ||
|
||
# We make env vars passed as build argument to be available in this build stage because we prebuild the NextJs app | ||
ARG NEXT_PUBLIC_GAUZY_API_SERVER_URL | ||
ARG NEXT_PUBLIC_GA_MEASUREMENT_ID | ||
ARG NEXT_PUBLIC_CAPTCHA_SITE_KEY | ||
ARG NEXT_PUBLIC_DISABLE_AUTO_REFRESH | ||
ARG NEXT_PUBLIC_COOKIE_DOMAINS | ||
ARG NEXT_PUBLIC_BOARD_APP_DOMAIN | ||
ARG NEXT_PUBLIC_BOARD_BACKEND_POST_URL | ||
ARG NEXT_PUBLIC_BOARD_FIREBASE_CONFIG | ||
ARG NEXT_PUBLIC_MEET_DOMAIN | ||
ARG NEXT_PUBLIC_SENTRY_DSN | ||
ARG NEXT_PUBLIC_SENTRY_DEBUG | ||
ARG NEXT_PUBLIC_JITSU_BROWSER_URL | ||
ARG NEXT_PUBLIC_JITSU_BROWSER_WRITE_KEY | ||
ARG NEXT_PUBLIC_GITHUB_APP_NAME | ||
ARG NEXT_PUBLIC_CHATWOOT_API_KEY | ||
|
||
# Install packages needed to build node modules | ||
RUN apt-get update -qq && \ | ||
apt-get install -y build-essential pkg-config python-is-python3 | ||
apt-get install -y build-essential pkg-config python-is-python3 | ||
|
||
# Install Yarn | ||
RUN npm install -g yarn --force | ||
|
@@ -35,19 +74,21 @@ COPY yarn.lock ./ | |
COPY apps/web/package.json ./apps/web/package.json | ||
|
||
RUN cd apps/web && \ | ||
yarn install --ignore-scripts | ||
yarn install --ignore-scripts | ||
|
||
# Copy application code | ||
COPY . . | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN echo $NEXT_PUBLIC_GAUZY_API_SERVER_URL | ||
|
||
# Build application | ||
RUN yarn run build:web | ||
|
||
# Remove development dependencies | ||
RUN cd apps/web && \ | ||
yarn install --prod --ignore-scripts | ||
yarn install --prod --ignore-scripts | ||
|
||
RUN yarn cache clean | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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 rm ever-teams --force || true) &&\ | ||
docker run --name ever-teams -d -p 3000:3000 ever-teams && sleep 5 | ||
|
||
EXPOSE WEBSITE localhost:3000 |
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 |
---|---|---|
@@ -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 |
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
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
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
Oops, something went wrong.