chore(frontend): remove enterprise flag

This commit is contained in:
leandrofars 2024-09-05 12:01:54 -03:00
parent 061456957c
commit a5211f4dba
6 changed files with 9 additions and 40 deletions

View File

@ -1,12 +1,12 @@
# ----------------------------- Local Environment ---------------------------- # # ----------------------------- Local Environment ---------------------------- #
NEXT_PUBLIC_WS_ENDPOINT="http://localhost:5000/" NEXT_PUBLIC_WS_ENDPOINT="http://localhost:5000/"
NEXT_PUBLIC_ENTERPRISE_VERSION="false" NEXT_PUBLIC_REST_ENDPOINT="http://localhost:8000"
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #
# -------------------------- Production Environment -------------------------- # # -------------------------- Production Environment -------------------------- #
#NEXT_PUBLIC_REST_ENDPOINT="https://demo.oktopus.app.br/api" #NEXT_PUBLIC_REST_ENDPOINT="https://demo.oktopus.app.br/"
#NEXT_PUBLIC_WS_ENDPOINT="https://demo.oktopus.app.br/" #NEXT_PUBLIC_WS_ENDPOINT="https://demo.oktopus.app.br/"
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #

View File

@ -7,7 +7,7 @@ RUN rm .env && rm .env.local || true
RUN npm install RUN npm install
RUN NEXT_PUBLIC_ENTERPRISE_VERSION="false" npm run build RUN npm run build
FROM node:18.18.0-alpine as runner FROM node:18.18.0-alpine as runner

View File

@ -1,24 +0,0 @@
FROM node:18.18.0-alpine as builder
WORKDIR /app
ARG GOOGLE_MAPS_API_KEY
COPY ../ ./
RUN rm .env && rm .env.local || true
RUN npm install
RUN NEXT_PUBLIC_ENTERPRISE_VERSION="true" NEXT_PUBLIC_GOOGLE_MAPS_KEY=${GOOGLE_MAPS_API_KEY} npm run build
FROM node:18.18.0-alpine as runner
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/public ./public
RUN npm install
CMD [ "npm", "run", "start" ]

View File

@ -21,13 +21,9 @@ help:
@echo "release - tag image as latest and push to registry" @echo "release - tag image as latest and push to registry"
build: build:
@docker build -t ${DOCKER_USER}/${DOCKER_APP}-ce:${DOCKER_TAG} -f Dockerfile.ce ../ @docker build -t ${DOCKER_USER}/${DOCKER_APP}:${DOCKER_TAG} -f Dockerfile ../
@docker build -t ${DOCKER_USER}/${DOCKER_APP}-ee:${DOCKER_TAG} -f Dockerfile.ee ../
release: build release: build
@docker push ${DOCKER_USER}/${DOCKER_APP}-ce:${DOCKER_TAG} @docker push ${DOCKER_USER}/${DOCKER_APP}:${DOCKER_TAG}
@docker push ${DOCKER_USER}/${DOCKER_APP}-ee:${DOCKER_TAG} @docker tag ${DOCKER_USER}/${DOCKER_APP}:${DOCKER_TAG} ${DOCKER_USER}/${DOCKER_APP}:latest
@docker tag ${DOCKER_USER}/${DOCKER_APP}-ce:${DOCKER_TAG} ${DOCKER_USER}/${DOCKER_APP}-ce:latest @docker push ${DOCKER_USER}/${DOCKER_APP}:latest
@docker tag ${DOCKER_USER}/${DOCKER_APP}-ee:${DOCKER_TAG} ${DOCKER_USER}/${DOCKER_APP}-ee:latest
@docker push ${DOCKER_USER}/${DOCKER_APP}-ce:latest
@docker push ${DOCKER_USER}/${DOCKER_APP}-ee:latest

View File

@ -113,9 +113,6 @@ export const SideNav = (props) => {
}} }}
> >
{items.map((item) => { {items.map((item) => {
if (item.title == "Map" && process.env.NEXT_PUBLIC_ENTERPRISE_VERSION != "true"){
return
}
const active = isItemActive(pathname, item.path); const active = isItemActive(pathname, item.path);
return ( return (

View File

@ -131,12 +131,12 @@ const Page = () => {
<Typography variant="h4"> <Typography variant="h4">
Login Login
</Typography> </Typography>
{!(process.env.NEXT_PUBLIC_ENTERPRISE_VERSION == "true") && <Typography <Typography
color="text.secondary" color="text.secondary"
variant="body2" variant="body2"
> >
This project is open source, reach out at <Link href='https://github.com/OktopUSP/oktopus'>Github</Link> or <Link href='https://join.slack.com/t/oktopustr-369/shared_invite/zt-1znmrbr52-3AXgOlSeQTPQW8_Qhn3C4g'>Slack</Link> This project is open source, reach out at <Link href='https://github.com/OktopUSP/oktopus'>Github</Link> or <Link href='https://join.slack.com/t/oktopustr-369/shared_invite/zt-1znmrbr52-3AXgOlSeQTPQW8_Qhn3C4g'>Slack</Link>
</Typography>} </Typography>
</Stack> </Stack>
{/*<Tabs {/*<Tabs
onChange={handleMethodChange} onChange={handleMethodChange}