update: remove the installer app from menu and navbar

This commit is contained in:
mahyargdz
2025-02-23 11:46:05 +03:30
parent f72289d099
commit 5fecf350e7
6 changed files with 113 additions and 124 deletions
+48 -48
View File
@@ -1,48 +1,48 @@
name: deploy to danak name: deploy to danak
on: on:
push: push:
branches: branches:
- main - main
jobs: jobs:
build_and_deploy: build_and_deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
DANAK_SERVER: "https://captain.stage.danakcorp.com" DANAK_SERVER: 'https://captain.run.danakcorp.com'
APP_TOKEN: 03786e2259b28db4b190733ab5e01505edf290820c69fa98d9b6961cbc79283b APP_TOKEN: 03786e2259b28db4b190733ab5e01505edf290820c69fa98d9b6961cbc79283b
CAPROVER_APP_NAME: asan-service APP_NAME: asan-service
GITHUB_TOKEN: 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 GITHUB_TOKEN: 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
steps: steps:
- name: Check out repositorys - name: Check out repositorys
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Container Registry - name: Login to Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: zmihamid username: zmihamid
password: ${{ env.GITHUB_TOKEN }} password: ${{ env.GITHUB_TOKEN }}
- name: Preset Image Name - name: Preset Image Name
run: echo "IMAGE_URL=$(echo ghcr.io/zmihamid/${{ github.event.repository.name }}:$(echo ${{ github.sha }} | cut -c1-7) | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV run: echo "IMAGE_URL=$(echo ghcr.io/zmihamid/${{ github.event.repository.name }}:$(echo ${{ github.sha }} | cut -c1-7) | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and push Docker Image - name: Build and push Docker Image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
push: true push: true
tags: ${{ env.IMAGE_URL }} tags: ${{ env.IMAGE_URL }}
- name: Install CapRover CLI - name: Install CapRover CLI
run: npm install -g caprover run: npm install -g caprover
- name: deploy to server - name: deploy to server
run: | run: |
caprover deploy -a $CAPROVER_APP_NAME -u $DANAK_SERVER --appToken $APP_TOKEN -i "$IMAGE_URL" caprover deploy -a $APP_NAME -u $DANAK_SERVER --appToken $APP_TOKEN -i "$IMAGE_URL"
+47 -47
View File
@@ -1,47 +1,47 @@
FROM node:20-alpine AS base FROM node:20-alpine AS base
RUN apk add --no-cache tzdata RUN apk add --no-cache tzdata
# Set the timezone to Asia/Tehran # Set the timezone to Asia/Tehran
RUN cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && echo "Asia/Tehran" > /etc/timezone RUN cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && echo "Asia/Tehran" > /etc/timezone
FROM base AS deps FROM base AS deps
WORKDIR /temp-deps WORKDIR /temp-deps
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
FROM base AS builder FROM base AS builder
WORKDIR /build WORKDIR /build
COPY . ./ COPY . ./
COPY --from=deps /temp-deps/node_modules ./node_modules COPY --from=deps /temp-deps/node_modules ./node_modules
RUN npm run build RUN npm run build
RUN npm install --omit=dev RUN npm install --omit=dev
FROM base AS runner FROM base AS runner
WORKDIR /app WORKDIR /app
ENV NUXT_TELEMETRY_DISABLED=1 ENV NUXT_TELEMETRY_DISABLED=1
RUN addgroup -S appgroup && adduser -S appuser -G appgroup RUN addgroup -S appgroup && adduser -S appuser -G appgroup
RUN chown -R appuser:appgroup /app RUN chown -R appuser:appgroup /app
# COPY --from=builder --chown=appuser:appgroup /build/.nuxt ./.nuxt # COPY --from=builder --chown=appuser:appgroup /build/.nuxt ./.nuxt
# COPY --from=builder --chown=appuser:appgroup /build/static ./static # COPY --from=builder --chown=appuser:appgroup /build/static ./static
# COPY --from=builder --chown=appuser:appgroup /build/package.json ./ # COPY --from=builder --chown=appuser:appgroup /build/package.json ./
# COPY --from=builder --chown=appuser:appgroup /build/node_modules/ ./node_modules/ # COPY --from=builder --chown=appuser:appgroup /build/node_modules/ ./node_modules/
COPY --from=builder --chown=appuser:appgroup /build ./ COPY --from=builder --chown=appuser:appgroup /build ./
USER appuser USER appuser
# Set environment variables # Set environment variables
ENV NODE_ENV=production ENV NODE_ENV=production
ENV PORT=7420 ENV PORT=7420
ENV HOSTNAME="0.0.0.0" ENV HOSTNAME="0.0.0.0"
EXPOSE 7420 EXPOSE 7420
# Start the Nuxt 2 app # Start the Nuxt 2 app
CMD ["npm", "start"] CMD ["npm", "start"]
+14 -24
View File
@@ -48,29 +48,22 @@
<!-- <span>راهنما</span>--> <!-- <span>راهنما</span>-->
</div> </div>
<ul class="uls">
<ul class="uls"> <!-- <li tag="li">
<li tag="li">
<a class="links" href="https://installer.asan-service.com/" target="_blank"> نرم افزار نصاب </a> <a class="links" href="https://installer.asan-service.com/" target="_blank"> نرم افزار نصاب </a>
</li> </li> -->
<li tag="li"> <li tag="li">
<a class="links" href="https://gps.asan-service.com/" target="_blank"> نرم افزار ردیاب </a> <a class="links" href="https://gps.asan-service.com/" target="_blank"> نرم افزار ردیاب </a>
</li> </li>
<nuxt-link <nuxt-link to="/apps" :class="$route.name.includes('download') && 'active'" tag="li">
to="/apps" <a class="links"> دانلود </a>
:class="$route.name.includes('download') && 'active'" </nuxt-link>
tag="li" <!-- <li tag="li">
>
<a class="links"> دانلود </a>
</nuxt-link>
<!-- <li tag="li">
<a class="links" href="#"> آموزش </a> <a class="links" href="#"> آموزش </a>
</li> --> </li> -->
</ul> </ul>
<div class="title"></div>
<div class="title"></div>
<ul> <ul>
<nuxt-link :to="{ name: 'learning', query: { page: 1 } }" tag="li"> <nuxt-link :to="{ name: 'learning', query: { page: 1 } }" tag="li">
@@ -83,7 +76,7 @@
<div class="title"> <div class="title">
<!-- <span>حساب کاربری</span>--> <!-- <span>حساب کاربری</span>-->
</div> </div>
<ul style="margin-bottom: 3rem;"> <ul style="margin-bottom: 3rem">
<nuxt-link :to="isUser ? { name: 'account' } : { name: 'auth-login-register' }" tag="li"> <nuxt-link :to="isUser ? { name: 'account' } : { name: 'auth-login-register' }" tag="li">
<a> <a>
<span v-if="isUser">{{ $auth.user.first_name + ' ' + $auth.user.last_name }}</span> <span v-if="isUser">{{ $auth.user.first_name + ' ' + $auth.user.last_name }}</span>
@@ -99,7 +92,6 @@
</aside> </aside>
</template> </template>
<script> <script>
export default { export default {
computed: { computed: {
@@ -180,6 +172,4 @@ export default {
} }
</script> </script>
<style scoped></style>
<style scoped>
</style>
+1 -2
View File
@@ -24,7 +24,7 @@
<i class="fas fa-angle-down"></i> <i class="fas fa-angle-down"></i>
</a> </a>
<div class="drop-down"> <div class="drop-down">
<a href="https://installer.asan-service.com/" target="_blank"> نرم افزار نصاب </a> <!-- <a href="https://installer.asan-service.com/" target="_blank"> نرم افزار نصاب </a> -->
<a href="https://gps.asan-service.com/" target="_blank"> نرم افزار ردیاب </a> <a href="https://gps.asan-service.com/" target="_blank"> نرم افزار ردیاب </a>
<a href="/apps"> دانلود </a> <a href="/apps"> دانلود </a>
<a href="#"> آموزش </a> <a href="#"> آموزش </a>
@@ -85,7 +85,6 @@
<a>دانلود ها</a> <a>دانلود ها</a>
</nuxt-link> </nuxt-link>
<li <li
class="dropDown-container contactus" class="dropDown-container contactus"
:class="contactusDropDownActiveClass && 'active'" :class="contactusDropDownActiveClass && 'active'"
+3 -3
View File
@@ -54,13 +54,13 @@
<!-- <a href="https://installer.asan-service.com" target="_blank"> <!-- <a href="https://installer.asan-service.com" target="_blank">
<img src="/assets/img/footer/pwaApp.png" alt="icon" /> <img src="/assets/img/footer/pwaApp.png" alt="icon" />
</a> --> </a> -->
<a href="https://installer.asan-service.com" target="_blank"> <!-- <a href="https://installer.asan-service.com" target="_blank">
<img class="firstImage" src="/assets/img/footer/AAA.png" alt="icon" /> <img class="firstImage" src="/assets/img/footer/AAA.png" alt="icon" />
</a> </a> -->
<a href="https://cafebazaar.ir/app/com.verity.app" target="_blank"> <a href="https://cafebazaar.ir/app/com.verity.app" target="_blank">
<img src="/assets/img/footer/dwnld.jpg" alt="icon" /> <img src="/assets/img/footer/dwnld.jpg" alt="icon" />
</a> </a>
<!-- <button> <!-- <button>
<a :href="config.andoridAppURL" target="_blank"> <a :href="config.andoridAppURL" target="_blank">
<img :width="100" src="/assets/img/footer/androidApp.png" alt="icon" /> <img :width="100" src="/assets/img/footer/androidApp.png" alt="icon" />