1 parent
c0b0eed0df
commit
4ae5e8f830
7 files changed
+96
-2
No files matched your search
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.idea
|
||||
.vscode
|
||||
coverage
|
||||
*.log
|
||||
@@ -0,0 +1,44 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: Deploy 🚀
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
env:
|
||||
IMAGE_NAME: git.madsky.ru/vadim/ulitka-app
|
||||
DEPLOY_DIR: ulitka-app
|
||||
concurrency:
|
||||
group: deploy-frontend
|
||||
cancel-in-progress: false
|
||||
jobs:
|
||||
Deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
- name: Docker build
|
||||
run: docker build --tag ${{ env.IMAGE_NAME }} .
|
||||
- name: Login to gitea
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: git.madsky.ru
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
- name: Push Docker image to gitea registry
|
||||
run: |
|
||||
IMAGE_TAG="${{ env.IMAGE_NAME }}:${{ gitea.sha }}"
|
||||
LATEST_TAG="${{ env.IMAGE_NAME }}:latest"
|
||||
docker tag ${{ env.IMAGE_NAME }} $IMAGE_TAG
|
||||
docker tag ${{ env.IMAGE_NAME }} $LATEST_TAG
|
||||
docker push $IMAGE_TAG
|
||||
docker push $LATEST_TAG
|
||||
- name: Execute remote SSH commands
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.PRIVATE_KEY }}
|
||||
script: |
|
||||
cd ${{ env.DEPLOY_DIR }} && docker compose pull && docker compose up -d
|
||||
- name: Ready
|
||||
run: echo "Success!"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
FROM node:lts-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
ulitka-app:
|
||||
image: git.madsky.ru/vadim/ulitka-app:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
BACKEND_UPSTREAM: ulitka:3000
|
||||
networks:
|
||||
- shared_net
|
||||
|
||||
networks:
|
||||
shared_net:
|
||||
external: true
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://${BACKEND_UPSTREAM}/api/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watchEffect } from 'vue'
|
||||
import { useIssueStore } from '@/stores/issue.js'
|
||||
import { useStatusStore } from '@/stores/status.ts'
|
||||
import ExpansionPanel from '@/components/ExpansionPanel.vue'
|
||||
import IssueContent from '@/components/IssueContent.vue'
|
||||
import type { Issue } from '@/api/issue.api.ts'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createAuthClient } from 'better-auth/vue'
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: 'http://localhost:3333',
|
||||
baseURL: window.location.origin,
|
||||
plugins: [],
|
||||
})
|
||||
Reference in new issue
Block a user